aboutsummaryrefslogtreecommitdiff
path: root/stand/efi
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-11-20 22:42:17 +0000
committerWarner Losh <imp@FreeBSD.org>2017-11-20 22:42:17 +0000
commit8a4217aacf57330755501a349d0ea662d4880386 (patch)
treec654a0b01626c218eb3359addb4cc8cfc19d540c /stand/efi
parentca50d6799da337ffbd58dbaadfed0c9f8a969e32 (diff)
downloadsrc-8a4217aacf57330755501a349d0ea662d4880386.tar.gz
src-8a4217aacf57330755501a349d0ea662d4880386.zip
Move some more common stuff up to Makefile.inc. In particular, the no
simd / no float stuff is centeralized here. Also centralise -ffreestanding since it is specified everywhere. This, along with a change to share/mk/bsd.cpu.mk to include -mno-avx2 in CFLAGS_NO_SIMD should fix building for newer machines (eg with CPUTYPE=haswell) where clang was generating avx2 instructions. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=326038
Diffstat (limited to 'stand/efi')
-rw-r--r--stand/efi/Makefile.inc12
-rw-r--r--stand/efi/fdt/Makefile7
2 files changed, 1 insertions, 18 deletions
diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc
index 4fd8762e1a21..704a77c6c397 100644
--- a/stand/efi/Makefile.inc
+++ b/stand/efi/Makefile.inc
@@ -1,23 +1,13 @@
# $FreeBSD$
-.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 ${CFLAGS_NO_SIMD}
+CFLAGS+= -Wformat
LDFLAGS+= -nostdlib
-.if ${MACHINE_CPUARCH} != "aarch64"
-CFLAGS+= -msoft-float
-.endif
-
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -fshort-wchar
CFLAGS+= -mno-red-zone
-CFLAGS+= -mno-aes
.endif
.if ${MACHINE_CPUARCH} == "aarch64"
diff --git a/stand/efi/fdt/Makefile b/stand/efi/fdt/Makefile
index 7308ce94e45e..6bae4390f37c 100644
--- a/stand/efi/fdt/Makefile
+++ b/stand/efi/fdt/Makefile
@@ -10,13 +10,6 @@ WARNS?= 6
SRCS= efi_fdt.c
-CFLAGS+= -ffreestanding
-.if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+= -mgeneral-regs-only
-.else
-CFLAGS+= -msoft-float
-.endif
-
# EFI library headers
CFLAGS+= -I${EFISRC}/include
CFLAGS+= -I${EFISRC}/include/${MACHINE}