|
| 1 | +From 0e41ccbc184b319475838f311c1a70e769549fa0 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Elizabeth Figura <zfigura@codeweavers.com> |
| 3 | +Date: Mon, 25 Aug 2025 18:10:18 -0500 |
| 4 | +Subject: [PATCH] ltmain.in: Pass through all warning flags to the linker. |
| 5 | + |
| 6 | +When link-time optimization (LTO) is used, some warnings are reported |
| 7 | +while linking, and the flags must be passed to the linker to enable or |
| 8 | +disable them. |
| 9 | + |
| 10 | +-W* also catches -Wl,* and -Wa,*, but the former is already accounted |
| 11 | +for in an earlier switch case, and the latter is already passed through. |
| 12 | + |
| 13 | +* build-aux/ltmain.in: Pass through all warning flags to the linker. |
| 14 | +--- |
| 15 | + build-aux/ltmain.in | 4 ++-- |
| 16 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 17 | + |
| 18 | +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in |
| 19 | +index 294ed43c..0f2c81f8 100644 |
| 20 | +--- a/build-aux/ltmain.in |
| 21 | ++++ b/build-aux/ltmain.in |
| 22 | +@@ -5664,7 +5664,7 @@ func_mode_link () |
| 23 | + # --unwindlib=* select unwinder library with clang |
| 24 | + # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking |
| 25 | + # -Wa,* Pass flags directly to the assembler |
| 26 | +- # -Werror, -Werror=* Report (specified) warnings as errors |
| 27 | ++ # -W* Warnings, needed for lto |
| 28 | + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
| 29 | + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \ |
| 30 | + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \ |
| 31 | +@@ -5672,7 +5672,7 @@ func_mode_link () |
| 32 | + -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \ |
| 33 | + -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \ |
| 34 | + -fdiagnostics-color*|-frecord-gcc-switches| \ |
| 35 | +- -fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*) |
| 36 | ++ -fuse-ld=*|-static-*|-fcilkplus|-W*) |
| 37 | + func_quote_arg pretty "$arg" |
| 38 | + arg=$func_quote_arg_result |
| 39 | + func_append compile_command " $arg" |
| 40 | +-- |
| 41 | +2.50.1 |
| 42 | + |
0 commit comments