freebsd-dev/sys/boot/efi/Makefile.inc
Andrew Turner 0362dbbd68 On arm64 build the efi loader with -fPIC. Without this clang 3.9 will
generate relocation in the self relocation code.

MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-10-31 11:13:36 +00:00

27 lines
521 B
Makefile

# $FreeBSD$
BINDIR?= /boot
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS+= -march=i386
CFLAGS+= -mno-aes
.endif
# Options used when building app-specific efi components
# See conf/kern.mk for the correct set of these
CFLAGS+= -ffreestanding -Wformat -msoft-float ${CFLAGS_NO_SIMD}
LDFLAGS+= -nostdlib
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -fshort-wchar
CFLAGS+= -mno-red-zone
CFLAGS+= -mno-aes
.endif
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -fshort-wchar
CFLAGS+= -fPIC
.endif
.include "../Makefile.inc"