mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Compile world with SafeStack from clang/llvm. Right now, only applications are compiled with SafeStack, not libraries. clang 3.9.0 does not support compiling shared libraries with SafeStack, though a patch has been proposed that would enable support. Note that with clang's current implementation of SafeStack, ASLR and W^X are prerequisites. SafeStack currently requires ASLR and W^X in order to be effective. Signed-off-by: Shawn Webb <shawn.webb@hardenedbsd.org>
19 lines
460 B
Makefile
19 lines
460 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
SSP_CFLAGS=
|
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
# Do not generate movt/movw, because the relocation fixup for them does not
|
|
# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
|
|
# Also, the fpu is not available in a standalone environment.
|
|
.if ${COMPILER_VERSION} < 30800
|
|
CFLAGS.clang+= -mllvm -arm-use-movt=0
|
|
.else
|
|
CFLAGS.clang+= -mno-movt
|
|
.endif
|
|
CFLAGS.clang+= -mfpu=none
|
|
.endif
|
|
|
|
NOSAFESTACK= yes
|