diff options
author | 2022-12-10 02:31:23 +0000 | |
---|---|---|
committer | 2022-12-10 02:31:23 +0000 | |
commit | 7ff3d75742a3560333334af9c92b282a99cc1486 (patch) | |
tree | 052207db4a85672e096dd5d71d17019f5f331541 | |
parent | darwin20-conf: split 2.4.6 into two (diff) | |
download | elt-patches-7ff3d75742a3560333334af9c92b282a99cc1486.tar.gz elt-patches-7ff3d75742a3560333334af9c92b282a99cc1486.tar.bz2 elt-patches-7ff3d75742a3560333334af9c92b282a99cc1486.zip |
2.4.6, 2.4.7: add -Werror filter bypass for LTO20221210
Bug: https://bugs.gentoo.org/884767
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | eltpatch.in | 2 | ||||
-rw-r--r-- | patches/werror/2.4.6 | 28 | ||||
-rw-r--r-- | patches/werror/2.4.7 | 30 |
3 files changed, 59 insertions, 1 deletions
diff --git a/eltpatch.in b/eltpatch.in index a0b0607..e3842bd 100644 --- a/eltpatch.in +++ b/eltpatch.in @@ -129,7 +129,7 @@ elibtoolize() { local force="false" local elt_patches=" install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm ppc64le - specs fsanitize fuse-ld static-flags + specs fsanitize fuse-ld static-flags werror " for x in "$@" ; do diff --git a/patches/werror/2.4.6 b/patches/werror/2.4.6 new file mode 100644 index 0000000..d1e8a6d --- /dev/null +++ b/patches/werror/2.4.6 @@ -0,0 +1,28 @@ +From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 10 Dec 2022 02:00:22 +0000 +Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering + +* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through + flat filtering at link time. + + This is needed for detecting likely-runtime problems with LTO using + e.g. -Werror=odr or -Werror=lto-type-mismatch. + +Bug: https://bugs.gentoo.org/884767 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -7382,10 +7382,11 @@ func_mode_link () + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ ++ # -Werror, -Werror=* Report (specified) warnings as errors + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ +- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) ++ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Werror|-Werror=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" diff --git a/patches/werror/2.4.7 b/patches/werror/2.4.7 new file mode 100644 index 0000000..8b0a761 --- /dev/null +++ b/patches/werror/2.4.7 @@ -0,0 +1,30 @@ +From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 10 Dec 2022 02:00:22 +0000 +Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering + +* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through + flat filtering at link time. + + This is needed for detecting likely-runtime problems with LTO using + e.g. -Werror=odr or -Werror=lto-type-mismatch. + +Bug: https://bugs.gentoo.org/884767 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5408,10 +5408,11 @@ func_mode_link () + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -Wa,* Pass flags directly to the assembler ++ # -Werror, -Werror=* Report (specified) warnings as errors + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ +- -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) ++ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result + func_append compile_command " $arg" +-- +2.38.1 |