Skip to content

Commit 2e37aa7

Browse files
[all] Test patch
1 parent d76aef8 commit 2e37aa7

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

build-dev-tarball.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ git clone --depth 2 -b "$branch" https://git.savannah.gnu.org/git/"$package".git
3939
git clone --depth 1 "${gnulib_url}"
4040

4141
# Apply patches.
42-
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch)
42+
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch \
43+
&& patch -p1 < ../patches/0001-ltmain.in-Pass-through-all-warning-flags-to-the-link.patch)
4344

4445
export GNULIB_SRCDIR=`pwd`/gnulib
4546
cd "$package"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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

Comments
 (0)