summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-26 11:32:39 +0000
committerdim <dim@FreeBSD.org>2013-12-26 11:32:39 +0000
commitf6df8d57188889ef1a72008fb41db0248faf92eb (patch)
tree592f8554fd57e64455687f551d76ed8fb72304ae
parentd9cb31b8aec01ac93a633f10e1cf3e972cd51e70 (diff)
downloadFreeBSD-src-f6df8d57188889ef1a72008fb41db0248faf92eb.zip
FreeBSD-src-f6df8d57188889ef1a72008fb41db0248faf92eb.tar.gz
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC after: 3 days X-MFC-With: r259730
-rw-r--r--lib/libstand/Makefile2
-rw-r--r--sys/boot/ficl/Makefile2
-rw-r--r--sys/boot/i386/Makefile.inc5
-rw-r--r--sys/boot/i386/boot2/Makefile7
-rw-r--r--sys/boot/pc98/Makefile.inc5
-rw-r--r--sys/boot/usb/Makefile2
-rw-r--r--sys/boot/usb/Makefile.test2
-rw-r--r--sys/boot/userboot/ficl/Makefile2
-rw-r--r--sys/boot/userboot/libstand/Makefile2
-rw-r--r--sys/boot/zfs/Makefile2
10 files changed, 17 insertions, 14 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 506b564..997616e 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -21,7 +21,7 @@ CFLAGS+= -ffreestanding -Wformat
CFLAGS+= -I${.CURDIR}
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE} == "pc98"
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 77f4a8f..9a3e399 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -17,7 +17,7 @@ CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
.if !defined(FICL64)
CFLAGS+= -march=i386
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
diff --git a/sys/boot/i386/Makefile.inc b/sys/boot/i386/Makefile.inc
index f5faec7..83b4d18 100644
--- a/sys/boot/i386/Makefile.inc
+++ b/sys/boot/i386/Makefile.inc
@@ -5,8 +5,9 @@
BINDIR?= /boot
LOADER_ADDRESS?=0x200000
-CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \
- -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+= -march=i386 -ffreestanding
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
+CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
LDFLAGS+= -nostdlib
.if ${MACHINE_CPUARCH} == "amd64"
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 68e49ed..8f1c150 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -23,10 +23,7 @@ BOOT2_UFS?= UFS1_AND_UFS2
#BOOT2_UFS?= UFS1_ONLY
CFLAGS= -Os \
- -fno-guess-branch-probability \
-fomit-frame-pointer \
- -fno-unit-at-a-time \
- -mno-align-long-strings \
-mrtd \
-mregparm=3 \
-DUSE_XREAD \
@@ -43,6 +40,10 @@ CFLAGS= -Os \
-Winline --param max-inline-insns-single=100 \
${CLANG_OPT_SMALL}
+CFLAGS.gcc+= -fno-guess-branch-probability \
+ -fno-unit-at-a-time \
+ -mno-align-long-strings \
+
LDFLAGS=-static -N --gc-sections
# Pick up ../Makefile.inc early.
diff --git a/sys/boot/pc98/Makefile.inc b/sys/boot/pc98/Makefile.inc
index 857c8bc..b613302 100644
--- a/sys/boot/pc98/Makefile.inc
+++ b/sys/boot/pc98/Makefile.inc
@@ -5,8 +5,9 @@
BINDIR?= /boot
LOADER_ADDRESS?=0x200000
-CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \
- -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+= -march=i386 -ffreestanding
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
+CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
CFLAGS+= -Os -DPC98
LDFLAGS+= -nostdlib
diff --git a/sys/boot/usb/Makefile b/sys/boot/usb/Makefile
index 3ed12c8..3e8c83e 100644
--- a/sys/boot/usb/Makefile
+++ b/sys/boot/usb/Makefile
@@ -53,7 +53,7 @@ CFLAGS+= -g
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -march=i386
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -m32
diff --git a/sys/boot/usb/Makefile.test b/sys/boot/usb/Makefile.test
index b7139e7..7c6a66d1 100644
--- a/sys/boot/usb/Makefile.test
+++ b/sys/boot/usb/Makefile.test
@@ -40,7 +40,7 @@ CFLAGS+= -g
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -march=i386
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -m32
diff --git a/sys/boot/userboot/ficl/Makefile b/sys/boot/userboot/ficl/Makefile
index 42b9309..7bd8dd5 100644
--- a/sys/boot/userboot/ficl/Makefile
+++ b/sys/boot/userboot/ficl/Makefile
@@ -16,7 +16,7 @@ CFLAGS+= -ffreestanding -fPIC
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_CPUARCH} == "i386"
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-sse3
.endif
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
diff --git a/sys/boot/userboot/libstand/Makefile b/sys/boot/userboot/libstand/Makefile
index 76af4b9..d312ee4 100644
--- a/sys/boot/userboot/libstand/Makefile
+++ b/sys/boot/userboot/libstand/Makefile
@@ -28,7 +28,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_CPUARCH} == "i386"
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-sse3
.endif
.if ${MACHINE} == "pc98"
diff --git a/sys/boot/zfs/Makefile b/sys/boot/zfs/Makefile
index 9b900e4..2407643 100644
--- a/sys/boot/zfs/Makefile
+++ b/sys/boot/zfs/Makefile
@@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs
CFLAGS+= -ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -march=i386
-CFLAGS+= -mpreferred-stack-boundary=2
+CFLAGS.gcc+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
OpenPOWER on IntegriCloud