aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-06-25 02:35:22 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-06-25 02:35:22 +0000
commite861dab451869582008237a8c11e97348d2440ce (patch)
tree706a2849bdd52ce4bd941877d552b4aea3fcce3a /share
parentf62da49b2f17f279ddba946bf4bc7ba7247273a5 (diff)
downloadsrc-e861dab451869582008237a8c11e97348d2440ce.tar.gz
src-e861dab451869582008237a8c11e97348d2440ce.zip
powerpc: Transition to Secure-PLT, like most other OSs (Toolchain part)
Summary: Toolchain follow-up to r349350. LLVM patches will be submitted upstream for 9.0 as well. The bsd.cpu.mk change is required because GNU ld assumes BSS-PLT if it cannot determine for certain that it needs Secure-PLT, and some binaries do not compile in such a way to make it know to use Secure-PLT. Reviewed By: nwhitehorn, bdragon, pfg Differential Revision: https://reviews.freebsd.org/D20598
Notes
Notes: svn path=/head/; revision=349351
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.cpu.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index acf1f5922593..c16ab5a85bf6 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -369,6 +369,10 @@ CFLAGS += -mfloat-abi=softfp
.endif
.endif
+.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe"
+LDFLAGS+= -Wl,--secure-plt
+.endif
+
.if ${MACHINE_ARCH} == "powerpcspe"
CFLAGS += -mcpu=8548 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double
.endif