summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patches/color-record/2.4.229
-rw-r--r--patches/fsanitize/2.4.235
-rw-r--r--patches/fuse-ld/2.4.234
-rw-r--r--patches/specs/2.4.230
-rw-r--r--patches/werror/2.4.228
5 files changed, 156 insertions, 0 deletions
diff --git a/patches/color-record/2.4.2 b/patches/color-record/2.4.2
new file mode 100644
index 0000000..9647592
--- /dev/null
+++ b/patches/color-record/2.4.2
@@ -0,0 +1,29 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 533d816dea307ad78c4e7ba16dcdec4c285b0bc8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 14 Jan 2024 06:27:33 +0000
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+ makes the link phase stick out like a sore thumb if there's warnings emitted.
+
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+ *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+ here as -g* is already whitelisted.
+
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
+--- ltmain.in
++++ ltmain.in
+@@ -5363,7 +5363,8 @@ func_mode_link ()
+ # -stdlib=* select c++ std lib with clang
+ -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=*|-Werror|-Werror=*)
++ -specs=*|-fsanitize=*|-fuse-ld=*|-Werror|-Werror=*| \
++ -fdiagnostics-color*|-frecord-gcc-switches)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
diff --git a/patches/fsanitize/2.4.2 b/patches/fsanitize/2.4.2
new file mode 100644
index 0000000..6374dca
--- /dev/null
+++ b/patches/fsanitize/2.4.2
@@ -0,0 +1,35 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5c6466528c060cc4660ad0319c00740db0e42ba
+
+From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
+Date: Sun, 18 Oct 2015 21:55:39 -0700
+Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=*
+
+References:
+https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html
+
+* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
+linker to allow trivial use of the clang address sanitizer.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 1cbe875dfd86..2a5aaadd68c0 100644
+--- ltmain.sh
++++ ltmain.sh
+@@ -5382,10 +5382,11 @@ func_mode_link ()
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
++ # -fsanitize=* Clang/GCC memory and address sanitizer
+ -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=*)
++ -specs=*|-fsanitize=*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
diff --git a/patches/fuse-ld/2.4.2 b/patches/fuse-ld/2.4.2
new file mode 100644
index 0000000..c6af7f2
--- /dev/null
+++ b/patches/fuse-ld/2.4.2
@@ -0,0 +1,34 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a
+
+From f9970d99293faf908fdc153a653fa5781095fb7a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 13 Feb 2016 02:14:29 -0500
+Subject: [PATCH] libtool: pass through -fuse-ld flags
+
+Starting with gcc-4.8, there's a -fuse-ld flag that can be used to
+select between bfd & gold. Make sure we pass it through to the
+linking stage.
+
+* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags
+through.
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 40eb0297f37d..26015641925e 100644
+--- ltmain.sh
++++ ltmain.sh
+@@ -5383,10 +5383,11 @@ func_mode_link ()
+ # -specs=* GCC specs files
+ # -fsanitize=* Clang/GCC memory and address sanitizer
++ # -fuse-ld=* Linker select flags for GCC
+ -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=*)
++ -specs=*|-fsanitize=*|-fuse-ld=*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
diff --git a/patches/specs/2.4.2 b/patches/specs/2.4.2
new file mode 100644
index 0000000..b95a1cd
--- /dev/null
+++ b/patches/specs/2.4.2
@@ -0,0 +1,30 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=702a97fbb09bd7088a50f2b239016d1e32843c24
+
+From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Fri, 18 Sep 2015 10:36:43 +0200
+Subject: [PATCH] libtool: fix GCC linking with -specs=*
+
+References:
+https://bugzilla.redhat.com/show_bug.cgi?id=985592
+
+* build-aux/ltmain.in (func_mode_link): Pass -specs=*
+to the linker, Fedora uses this option for hardening.
+
+Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
+
+--- ltmain.sh
++++ ltmain.sh
+@@ -7272,10 +7272,12 @@
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
++ # -specs=* GCC specs files
+ -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)
++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin| \
++ -specs=*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
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"