1 From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
2 From: Pavel Raiskup <praiskup@redhat.com>
3 Date: Fri, 18 Sep 2015 10:36:43 +0200
4 Subject: [PATCH] libtool: fix GCC linking with -specs=*
7 https://bugzilla.redhat.com/show_bug.cgi?id=985592
9 * build-aux/ltmain.in (func_mode_link): Pass -specs=*
10 to the linker, Fedora uses this option for hardening.
12 Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
14 build-aux/ltmain.in | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
17 diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
18 index d5cf07a..0c40da0 100644
19 --- a/build-aux/ltmain.in
20 +++ b/build-aux/ltmain.in
21 @@ -5360,10 +5360,12 @@ func_mode_link ()
22 # -tp=* Portland pgcc target processor selection
23 # --sysroot=* for sysroot support
24 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
25 + # -specs=* GCC specs files
26 # -stdlib=* select c++ std lib with clang
27 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
28 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
29 - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
30 + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
32 func_quote_for_eval "$arg"
33 arg=$func_quote_for_eval_result
34 func_append compile_command " $arg"
36 patch the generated file too to keep help2man from generating man pages
37 https://bugs.gentoo.org/556512
39 --- a/build-aux/ltmain.sh
40 +++ b/build-aux/ltmain.sh
41 @@ -5360,10 +5360,12 @@ func_mode_link ()
42 # -tp=* Portland pgcc target processor selection
43 # --sysroot=* for sysroot support
44 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
45 + # -specs=* GCC specs files
46 # -stdlib=* select c++ std lib with clang
47 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
48 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
49 - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
50 + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
52 func_quote_for_eval "$arg"
53 arg=$func_quote_for_eval_result
54 func_append compile_command " $arg"