summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/boot2/Makefile
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-03-08 22:50:45 +0000
committerdim <dim@FreeBSD.org>2015-03-08 22:50:45 +0000
commit024c8e7e83a469426818d9637de16340a8c21d50 (patch)
treed6b96cdb43824fa0183f310b9e05f0e4d51c4391 /sys/boot/i386/boot2/Makefile
parent7a6eeb3b53fd5238e9bb93186395bbba9d29b220 (diff)
downloadFreeBSD-src-024c8e7e83a469426818d9637de16340a8c21d50.zip
FreeBSD-src-024c8e7e83a469426818d9637de16340a8c21d50.tar.gz
MFC r279598:
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
Diffstat (limited to 'sys/boot/i386/boot2/Makefile')
-rw-r--r--sys/boot/i386/boot2/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile
index 1391ac4..d68d07b 100644
--- a/sys/boot/i386/boot2/Makefile
+++ b/sys/boot/i386/boot2/Makefile
@@ -42,8 +42,10 @@ CFLAGS= -Os \
CFLAGS.gcc+= -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
LD_FLAGS=-static -N --gc-sections
OpenPOWER on IntegriCloud