summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-04-09 09:13:10 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-04-09 09:13:14 +0200
commit2c8a97198098908a5035ff41ed969b71041a087a (patch)
tree25613809d2ff43e958b0cc2fde8eb640dd0627a5
parent48fe4b4b26bcd21397065a2982c5d329606d3740 (diff)
downloadptxdist-2c8a97198098908a5035ff41ed969b71041a087a.tar.gz
ptxdist-2c8a97198098908a5035ff41ed969b71041a087a.tar.xz
host-autotools-libtool: add some upstream fixes
This makes sure that -specs=*, -fsanitize=* and -fuse-ld=* is handled properly. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/libtool-2.4.6/0003-libtool-fix-GCC-linking-with-specs.patch33
-rw-r--r--patches/libtool-2.4.6/0004-libtool-fix-GCC-clang-linking-with-fsanitize.patch33
-rw-r--r--patches/libtool-2.4.6/0005-libtool-pass-through-fuse-ld-flags.patch32
-rw-r--r--patches/libtool-2.4.6/series5
4 files changed, 102 insertions, 1 deletions
diff --git a/patches/libtool-2.4.6/0003-libtool-fix-GCC-linking-with-specs.patch b/patches/libtool-2.4.6/0003-libtool-fix-GCC-linking-with-specs.patch
new file mode 100644
index 000000000..c40a2b711
--- /dev/null
+++ b/patches/libtool-2.4.6/0003-libtool-fix-GCC-linking-with-specs.patch
@@ -0,0 +1,33 @@
+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>
+---
+ build-aux/ltmain.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index d5cf07a63f59..0c40da06deb4 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5360,10 +5360,12 @@ func_mode_link ()
+ # -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
+ # -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|-fstack-protector*|-stdlib=*)
++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++ -specs=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
diff --git a/patches/libtool-2.4.6/0004-libtool-fix-GCC-clang-linking-with-fsanitize.patch b/patches/libtool-2.4.6/0004-libtool-fix-GCC-clang-linking-with-fsanitize.patch
new file mode 100644
index 000000000..67e103ca3
--- /dev/null
+++ b/patches/libtool-2.4.6/0004-libtool-fix-GCC-clang-linking-with-fsanitize.patch
@@ -0,0 +1,33 @@
+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 0c40da06deb4..d063aa44a486 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5362,10 +5362,11 @@ func_mode_link ()
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
++ # -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|-fstack-protector*|-stdlib=*| \
+- -specs=*)
++ -specs=*|-fsanitize=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
diff --git a/patches/libtool-2.4.6/0005-libtool-pass-through-fuse-ld-flags.patch b/patches/libtool-2.4.6/0005-libtool-pass-through-fuse-ld-flags.patch
new file mode 100644
index 000000000..e7c88c60c
--- /dev/null
+++ b/patches/libtool-2.4.6/0005-libtool-pass-through-fuse-ld-flags.patch
@@ -0,0 +1,32 @@
+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 d063aa44a486..14e45d0b9d07 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5363,10 +5363,11 @@ func_mode_link ()
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -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|-fstack-protector*|-stdlib=*| \
+- -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/libtool-2.4.6/series b/patches/libtool-2.4.6/series
index 884c5cf53..c0b3d421b 100644
--- a/patches/libtool-2.4.6/series
+++ b/patches/libtool-2.4.6/series
@@ -2,4 +2,7 @@
#tag:base --start-number 1
0001-libool.m4-add-ARFLAGS-variable.patch
0002-ARFLAGS-use-cr-instead-of-cru-by-default.patch
-# b42e3ae11d0f098f770ef6bedc9d21c7 - git-ptx-patches magic
+0003-libtool-fix-GCC-linking-with-specs.patch
+0004-libtool-fix-GCC-clang-linking-with-fsanitize.patch
+0005-libtool-pass-through-fuse-ld-flags.patch
+# 55967635b8c962a56e9ee2fd8dc06f7d - git-ptx-patches magic