diff options
author | dim <dim@FreeBSD.org> | 2015-03-08 22:50:45 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-03-08 22:50:45 +0000 |
commit | 024c8e7e83a469426818d9637de16340a8c21d50 (patch) | |
tree | d6b96cdb43824fa0183f310b9e05f0e4d51c4391 | |
parent | 7a6eeb3b53fd5238e9bb93186395bbba9d29b220 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/boot/i386/boot2/Makefile | 4 | ||||
-rw-r--r-- | sys/boot/pc98/boot2/Makefile | 4 |
2 files changed, 6 insertions, 2 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 diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile index f76b805..acbf897 100644 --- a/sys/boot/pc98/boot2/Makefile +++ b/sys/boot/pc98/boot2/Makefile @@ -40,8 +40,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 # Set machine type to PC98_SYSTEM_PARAMETER #CFLAGS+= -DSET_MACHINE_TYPE |