diff options
Diffstat (limited to 'patches/werror/2.4.2')
-rw-r--r-- | patches/werror/2.4.2 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/werror/2.4.2 b/patches/werror/2.4.2 new file mode 100644 index 0000000..973fea1 --- /dev/null +++ b/patches/werror/2.4.2 @@ -0,0 +1,28 @@ +https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg00000.html + +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 ++ # -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| \ +- -specs=*|-fsanitize=*|-fuse-ld=*) ++ -specs=*|-fsanitize=*|-fuse-ld=*|-Werror|-Werror=*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" |