svn commit: r241785 - in head/sys/boot: efi ficl i386 userboot/ficl zfs
Andriy Gapon
avg at FreeBSD.org
Sat Oct 20 16:57:24 UTC 2012
Author: avg
Date: Sat Oct 20 16:57:23 2012
New Revision: 241785
URL: http://svn.freebsd.org/changeset/base/241785
Log:
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
Modified:
head/sys/boot/efi/Makefile.inc
head/sys/boot/ficl/Makefile
head/sys/boot/i386/Makefile.inc
head/sys/boot/userboot/ficl/Makefile
head/sys/boot/zfs/Makefile
Modified: head/sys/boot/efi/Makefile.inc
==============================================================================
--- head/sys/boot/efi/Makefile.inc Sat Oct 20 15:30:14 2012 (r241784)
+++ head/sys/boot/efi/Makefile.inc Sat Oct 20 16:57:23 2012 (r241785)
@@ -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
Modified: head/sys/boot/ficl/Makefile
==============================================================================
--- head/sys/boot/ficl/Makefile Sat Oct 20 15:30:14 2012 (r241784)
+++ head/sys/boot/ficl/Makefile Sat Oct 20 16:57:23 2012 (r241785)
@@ -8,6 +8,7 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -march=i386
CFLAGS+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
@@ -39,7 +40,7 @@ SOFTWORDS= softcore.fr jhlocal.fr marker
#SOFTWORDS+= oo.fr classes.fr
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -m32 -march=i386 -I.
+CFLAGS+= -m32 -I.
.endif
.if ${MACHINE_ARCH} == "powerpc64"
Modified: head/sys/boot/i386/Makefile.inc
==============================================================================
--- head/sys/boot/i386/Makefile.inc Sat Oct 20 15:30:14 2012 (r241784)
+++ head/sys/boot/i386/Makefile.inc Sat Oct 20 16:57:23 2012 (r241785)
@@ -5,12 +5,12 @@
BINDIR?= /boot
LOADER_ADDRESS?=0x200000
-CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \
+CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
LDFLAGS+= -nostdlib
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -m32 -march=i386
+CFLAGS+= -m32
ACFLAGS+= -m32
LDFLAGS+= -m elf_i386_fbsd
AFLAGS+= --32
Modified: head/sys/boot/userboot/ficl/Makefile
==============================================================================
--- head/sys/boot/userboot/ficl/Makefile Sat Oct 20 15:30:14 2012 (r241784)
+++ head/sys/boot/userboot/ficl/Makefile Sat Oct 20 16:57:23 2012 (r241785)
@@ -12,6 +12,7 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
CFLAGS+= -ffreestanding -fPIC
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+#CFLAGS+= -march=i386
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_CPUARCH} == "i386"
@@ -46,7 +47,7 @@ SOFTWORDS= softcore.fr jhlocal.fr marker
#SOFTWORDS+= oo.fr classes.fr
#.if ${MACHINE_CPUARCH} == "amd64"
-#CFLAGS+= -m32 -march=i386 -I.
+#CFLAGS+= -m32 -I.
#.endif
.if ${MACHINE_ARCH} == "powerpc64"
Modified: head/sys/boot/zfs/Makefile
==============================================================================
--- head/sys/boot/zfs/Makefile Sat Oct 20 15:30:14 2012 (r241784)
+++ head/sys/boot/zfs/Makefile Sat Oct 20 16:57:23 2012 (r241785)
@@ -12,6 +12,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zf
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -march=i386
CFLAGS+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
@@ -19,7 +20,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m
CFLAGS+= -msoft-float
.endif
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -m32 -march=i386
+CFLAGS+= -m32
.endif
CFLAGS+= -Wformat -Wall
More information about the svn-src-all
mailing list