summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch')
-rw-r--r--meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
new file mode 100644
index 0000000000..a82b2ec5a1
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
@@ -0,0 +1,53 @@
1Source: http://permalink.gmane.org/gmane.comp.gnu.libtool.bugs/7341
2
3Bug confirmed. When code is compiled with -fstack-protector{,-all},
4GCC "emits extra code to check for buffer overflows, such as stack
5smashing attacks". This extra code uses symbols from libssp, and
6therefore (at least) Cygwin's GCC specs contain:
7
8*link_ssp:
9%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
10
11Therefore, when libtool fails to pass -fstack-protector{,-all} at link
12stage, the link fails.
13
14Patch attached. (Yes, I have a copyright assignment on file.)
15
16Yaakov
17Cygwin/X
18
19From b79f4e117b6f73cc461a2e232063e08481d33300 Mon Sep 17 00:00:00 2001
20From: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
21Date: Tue, 1 Jun 2010 22:18:51 -0500
22Subject: [PATCH] Fix linking with -fstack-protector
23
24* libltdl/config/ltmain.m4sh (func_mode_link): Pass -fstack-protector*
25to the linker as it is required at link time to resolve libssp symbols.
26
27Signed-off-by: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
28---
29 libltdl/config/ltmain.m4sh | 4 +++-
30 1 files changed, 3 insertions(+), 1 deletions(-)
31
32Signed-off-by: Khem Raj <raj.khem@gmail.com>
33Upstream-Status: Pending
34Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
35===================================================================
36--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh 2012-06-01 12:35:44.089638130 -0700
37+++ libtool-2.4.2/libltdl/config/ltmain.m4sh 2012-06-01 12:37:25.789643055 -0700
38@@ -5067,13 +5067,14 @@
39 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
40 # -F/path path to uninstalled frameworks, gcc on darwin
41 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
42+ # -fstack-protector* stack protector flags for GCC
43 # @file GCC response files
44 # -tp=* Portland pgcc target processor selection
45 # --sysroot=* for sysroot support
46 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
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*|-flto*|-fwhopr*|-fuse-linker-plugin)
50+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
51 func_quote_for_eval "$arg"
52 arg="$func_quote_for_eval_result"
53 func_append compile_command " $arg"