For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.

MFC after:	3 days
X-MFC-With:	r259730
This commit is contained in:
Dimitry Andric 2013-12-26 11:32:39 +00:00
parent 8a69c4ada4
commit 0673132dcb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259913
10 changed files with 17 additions and 14 deletions

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"