aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2009-06-28 23:51:39 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2009-06-28 23:51:39 +0000
commita162c9ae9c55a9593b15ef618f4df0a045e39dbd (patch)
tree601ae0a8f92e47fd15b2574968520ee80c372d0e /gnu/usr.bin
parent49c8326a790004bd9229fc97a07a40f874373bcf (diff)
Notes
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cc/cc_tools/freebsd-native.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h
index 6f7fd7b81f51..b9ddea131909 100644
--- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h
+++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h
@@ -62,3 +62,11 @@
/* FreeBSD is 4.4BSD derived */
#define bsd4_4
+
+/*
+ * Link in libssp_nonshared to get local hidden symbol for
+ * __stack_chk_fail_local into each binary that needs it.
+ * Linux does this with static part of their libc.so linker script, we reuse
+ * libssp_nonshared.a for the same purpose.
+ */
+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}"