summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc/cc_tools
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/cc/cc_tools')
-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 6f7fd7b..b9ddea1 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}"
OpenPOWER on IntegriCloud