summaryrefslogtreecommitdiffstats
path: root/lib/libcompiler_rt
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-01-07 14:35:45 +0000
committerkib <kib@FreeBSD.org>2011-01-07 14:35:45 +0000
commit6e2bdd0ef1281c368ed6f581272c7c9df5a669f9 (patch)
treeae5e9755c46542e3b4f2bf6c4b62dd317ebe2201 /lib/libcompiler_rt
parentb6c43c911b809a47312fce3863db3497a03d0728 (diff)
downloadFreeBSD-src-6e2bdd0ef1281c368ed6f581272c7c9df5a669f9.zip
FreeBSD-src-6e2bdd0ef1281c368ed6f581272c7c9df5a669f9.tar.gz
On amd64 and i386, force assembler to mark objects compiled from the
assembler source for libcompiler_rt as not needed executable stack. This is done with a hammer instead of properly marking each assembly file with section .note.GNU-stack to avoid modifying contributed source. Discussed with: ed
Diffstat (limited to 'lib/libcompiler_rt')
-rw-r--r--lib/libcompiler_rt/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index f27dcf5..6e3ebb9 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -156,4 +156,10 @@ SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
. endif
.endif
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
+AFLAGS+=--noexecstack
+ACFLAGS+=-Wl,a,--noexecstack
+.endif
+
+
.include <bsd.lib.mk>
OpenPOWER on IntegriCloud