From 2e616087c1dce036105331cb0ef67e57499011f3 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 26 Mar 2018 16:35:18 +0200 Subject: [PATCH] libtool: pass -specs=* option down to gcc Resolves: rhbz#985592 Version: 2.4.6-23 --- libtool-2.4.6-specs.patch | 37 +++++++++++++++++++++++++++++++++++++ libtool.spec | 5 +++++ 2 files changed, 42 insertions(+) create mode 100644 libtool-2.4.6-specs.patch diff --git a/libtool-2.4.6-specs.patch b/libtool-2.4.6-specs.patch new file mode 100644 index 0000000..6a4764f --- /dev/null +++ b/libtool-2.4.6-specs.patch @@ -0,0 +1,37 @@ +From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Fri, 18 Sep 2015 10:36:43 +0200 +Subject: 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 +--- + 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 d5cf07a..0c40da0 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" +-- +cgit v1.0-41-gc330 + diff --git a/libtool.spec b/libtool.spec index e4483cd..e0d3963 100644 --- a/libtool.spec +++ b/libtool.spec @@ -25,6 +25,9 @@ Patch0: libtool-2.4.5-rpath.patch # ~> downstream (TODO) Patch1: libtool-2.4.6-am-1.16-test.patch +# ~> upstream 702a97fbb +Patch2: libtool-2.4.6-specs.patch + %if ! 0%{?_module_build} Patch100: libtool-nodocs.patch %endif @@ -99,6 +102,7 @@ Static libraries and header files for development with ltdl. %setup -n libtool-%{version} -q %patch0 -p1 -b .rpath %patch1 -p1 -b .test +%patch2 -p1 -b .gcc-specs %if ! 0%{?_module_build} %patch100 -p1 -b .nodocs %endif @@ -194,6 +198,7 @@ fi * Mon Mar 26 2018 Pavel Raiskup - 2.4.6-23 - bake in versioned requirement on automake (rhbz#1193591) - fix testsuite FTBFS against automake 1.16.1 +- bypass -specs=* to gcc (rhbz#985592) * Wed Feb 07 2018 Fedora Release Engineering - 2.4.6-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild