Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Mar 2015 20:33:16 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279598 - in head/sys/boot: i386/boot2 pc98/boot2
Message-ID:  <201503042033.t24KXGX9067956@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Mar  4 20:33:15 2015
New Revision: 279598
URL: https://svnweb.freebsd.org/changeset/base/279598

Log:
  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

Modified:
  head/sys/boot/i386/boot2/Makefile
  head/sys/boot/pc98/boot2/Makefile

Modified: head/sys/boot/i386/boot2/Makefile
==============================================================================
--- head/sys/boot/i386/boot2/Makefile	Wed Mar  4 20:04:23 2015	(r279597)
+++ head/sys/boot/i386/boot2/Makefile	Wed Mar  4 20:33:15 2015	(r279598)
@@ -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}
 

Modified: head/sys/boot/pc98/boot2/Makefile
==============================================================================
--- head/sys/boot/pc98/boot2/Makefile	Wed Mar  4 20:04:23 2015	(r279597)
+++ head/sys/boot/pc98/boot2/Makefile	Wed Mar  4 20:33:15 2015	(r279598)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503042033.t24KXGX9067956>