summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-04-03 15:25:59 +0000
committerandrew <andrew@FreeBSD.org>2015-04-03 15:25:59 +0000
commit53508afb80d80031b09c713e652e40816b867524 (patch)
treef97f08412d0f3ce0b7417831391d12e9c2d74f99 /sys/boot
parent326429ebddeecd080b1aca0f6d84d7ea3a853d57 (diff)
downloadFreeBSD-src-53508afb80d80031b09c713e652e40816b867524.zip
FreeBSD-src-53508afb80d80031b09c713e652e40816b867524.tar.gz
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/Makefile10
2 files changed, 16 insertions, 5 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 554df39..2bcdc31 100644
--- a/sys/boot/efi/boot1/Makefile
+++ b/sys/boot/efi/boot1/Makefile
@@ -23,14 +23,18 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include
CFLAGS+= -I${.CURDIR}/../../..
# Always add MI sources and REGULAR efi loader bits
-.PATH: ${.CURDIR}/../loader/arch/amd64 ${.CURDIR}/../../common
+.PATH: ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH} ${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../common
FILES= boot1.efi boot1.efifat
FILESMODE_boot1.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
-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}
@@ -73,6 +77,7 @@ CLEANFILES= boot1.efifat
.include <bsd.prog.mk>
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
beforedepend ${OBJS}: machine x86
CLEANFILES+= machine x86 boot1.efi
@@ -82,3 +87,4 @@ machine:
x86:
ln -sf ${.CURDIR}/../../../x86/include x86
+.endif
OpenPOWER on IntegriCloud