From 024c8e7e83a469426818d9637de16340a8c21d50 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 8 Mar 2015 22:50:45 +0000 Subject: 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 --- sys/boot/i386/boot2/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/boot/i386/boot2/Makefile') 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 -- cgit v1.1