summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/Makefile.inc
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2012-10-20 16:57:23 +0000
committeravg <avg@FreeBSD.org>2012-10-20 16:57:23 +0000
commit8131f8e4f64ff09f74346b0ba6654eb7ff617d6b (patch)
treee5db5e78b9212aedf1937ce47ea7417575261b5c /sys/boot/efi/Makefile.inc
parent5d26a5d3b58499e3137deceb3d390fd61f288129 (diff)
downloadFreeBSD-src-8131f8e4f64ff09f74346b0ba6654eb7ff617d6b.zip
FreeBSD-src-8131f8e4f64ff09f74346b0ba6654eb7ff617d6b.tar.gz
boot: use -march=i386 for both i386 and amd64 builds
.. so that consistent compilation algorithms are used for both architectures as in practice the binaries are expected to be interchangeable (for time being). Previously i386 used default setting which were equivalent to -march=i486 -mtune=generic. The only difference is using smaller but slower "leave" instructions. Discussed with: jhb, dim MFC after: 29 days
Diffstat (limited to 'sys/boot/efi/Makefile.inc')
-rw-r--r--sys/boot/efi/Makefile.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/boot/efi/Makefile.inc b/sys/boot/efi/Makefile.inc
index 7e75a6c..7446d31 100644
--- a/sys/boot/efi/Makefile.inc
+++ b/sys/boot/efi/Makefile.inc
@@ -2,8 +2,12 @@
BINDIR?= /boot
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -march=i386
+.endif
+
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -m32 -march=i386
+CFLAGS+= -m32
ACFLAGS+= -m32
LDFLAGS+= -m elf_i386_fbsd
AFLAGS+= --32
OpenPOWER on IntegriCloud