759e131362
clang 3.9.0 without -fPIC generates absolute jump table for switch/case statement which trips boot1.efi and loader.efi on ARM platform. Reviewed by: andrew MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9108
31 lines
576 B
Makefile
31 lines
576 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
|
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
CFLAGS+= -fPIC
|
|
.endif
|
|
|
|
.include "../Makefile.inc"
|