aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@coosemans.org>2012-01-28 23:13:47 +0000
committerGerald Pfeifer <gerald@gcc.gnu.org>2012-01-28 23:13:47 +0000
commitfc4c0b4335eb6f5d3263756ff3845c835a6205ac (patch)
treec82518e46de28dabe12689ca809d8d649fb09ce4
parentdf8b5535762e1191ecaa5147ac58b1593303f3c9 (diff)
downloadgcc-fc4c0b4335eb6f5d3263756ff3845c835a6205ac.zip
gcc-fc4c0b4335eb6f5d3263756ff3845c835a6205ac.tar.gz
gcc-fc4c0b4335eb6f5d3263756ff3845c835a6205ac.tar.bz2
* config/freebsd-spec.h [TARGET_LIBC_PROVIDES_SSP]
(LINK_SSP_SPEC): Define. From-SVN: r183670
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/freebsd-spec.h8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4b1578c..36bc3d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-29 Tijl Coosemans <tijl@coosemans.org>
+
+ * config/freebsd-spec.h [TARGET_LIBC_PROVIDES_SSP]
+ (LINK_SSP_SPEC): Define.
+
2012-01-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/51871
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h
index d8b3382..ab587ed 100644
--- a/gcc/config/freebsd-spec.h
+++ b/gcc/config/freebsd-spec.h
@@ -1,6 +1,6 @@
/* Base configuration file for all FreeBSD targets.
- Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -138,6 +138,10 @@ is built with the --enable-threads configure-time option.} \
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
+#ifdef TARGET_LIBC_PROVIDES_SSP
+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}"
+#endif
+
/* Use --as-needed -lgcc_s for eh support. */
#ifdef HAVE_LD_AS_NEEDED
#define USE_LD_AS_NEEDED 1