summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-03-04 20:33:15 +0000
committerdim <dim@FreeBSD.org>2015-03-04 20:33:15 +0000
commit7c437941ffdd4b79a6e7d408dac937b0a4f8ff2b (patch)
tree68c89a5f56ec7c2f7f3310addc980a053c954772
parent5686bc9fd4d0d9564bce33235e0408e0ebc3b60d (diff)
downloadFreeBSD-src-7c437941ffdd4b79a6e7d408dac937b0a4f8ff2b.zip
FreeBSD-src-7c437941ffdd4b79a6e7d408dac937b0a4f8ff2b.tar.gz
When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc. This is checked by comparing the version number against 4.2.1, which is not exactly right, but good enough. (There is no other way to check whether we are using the non-standard gcc in base, as far as I know.) Reported by: rodrigc MFC after: 3 days
-rw-r--r--sys/boot/i386/boot2/Makefile4
-rw-r--r--sys/boot/pc98/boot2/Makefile4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 878fd15..d5091ea 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -41,8 +41,10 @@ CFLAGS= -fomit-frame-pointer \
CFLAGS.gcc+= -Os \
-fno-guess-branch-probability \
-fno-unit-at-a-time \
- -mno-align-long-strings \
--param max-inline-insns-single=100
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201
+CFLAGS.gcc+= -mno-align-long-strings
+.endif
CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index 24de9d4..7e7d31c 100644
--- a/sys/boot/pc98/boot2/Makefile
+++ b/sys/boot/pc98/boot2/Makefile
@@ -39,8 +39,10 @@ CFLAGS= -fomit-frame-pointer \
CFLAGS.gcc+= -Os \
-fno-guess-branch-probability \
-fno-unit-at-a-time \
- -mno-align-long-strings \
--param max-inline-insns-single=100
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201
+CFLAGS.gcc+= -mno-align-long-strings
+.endif
# Set machine type to PC98_SYSTEM_PARAMETER
#CFLAGS+= -DSET_MACHINE_TYPE
OpenPOWER on IntegriCloud