opnsense-src/sys/boot/Makefile.inc
Shawn Webb 0a3c143144 HBSD: Introducing SafeStack
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>
2017-03-15 06:37:35 +01:00

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