summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-01-11 00:43:50 +0000
committeremaste <emaste@FreeBSD.org>2016-01-11 00:43:50 +0000
commit3066f138bc3bf99f5cf6ec9412903d206c329cc7 (patch)
tree35061f0a7c74838402d7b6896685dbded35304d5 /sys/boot
parentd10ff89a31425b9a2c8478ba1f7a305136b260b1 (diff)
downloadFreeBSD-src-3066f138bc3bf99f5cf6ec9412903d206c329cc7.zip
FreeBSD-src-3066f138bc3bf99f5cf6ec9412903d206c329cc7.tar.gz
MFC r281027: Clean up more x86 only options in the efi code.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/efi/Makefile.inc11
-rw-r--r--sys/boot/efi/boot1/Makefile8
2 files changed, 15 insertions, 4 deletions
diff --git a/sys/boot/efi/Makefile.inc b/sys/boot/efi/Makefile.inc
index 58c4726..d9474dc 100644
--- a/sys/boot/efi/Makefile.inc
+++ b/sys/boot/efi/Makefile.inc
@@ -8,9 +8,14 @@ CFLAGS+= -march=i386
# Options used when building app-specific efi components
# See conf/kern.mk for the correct set of these
-CFLAGS+= -ffreestanding -fshort-wchar -Wformat
-CFLAGS+= -mno-red-zone
-CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float
+CFLAGS+= -ffreestanding -Wformat -msoft-float
LDFLAGS+= -nostdlib
+.if ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -fshort-wchar
+CFLAGS+= -mno-red-zone
+CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx
+.endif
+
+
.include "../Makefile.inc"
diff --git a/sys/boot/efi/boot1/Makefile b/sys/boot/efi/boot1/Makefile
index d9d8256..ddf3147 100644
--- a/sys/boot/efi/boot1/Makefile
+++ b/sys/boot/efi/boot1/Makefile
@@ -32,7 +32,11 @@ FILES= boot1.efi boot1.efifat
FILESMODE_boot1.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
-LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc
+LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
+
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
+LDFLAGS+= -Wl,-znocombreloc
+.endif
${PROG}: ${LDSCRIPT}
@@ -75,6 +79,7 @@ CLEANFILES= boot1.efifat
.include <bsd.prog.mk>
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
beforedepend ${OBJS}: machine x86
CLEANFILES+= machine x86 boot1.efi
@@ -84,3 +89,4 @@ machine:
x86:
ln -sf ${.CURDIR}/../../../x86/include x86
+.endif
OpenPOWER on IntegriCloud