Date: Tue, 7 Sep 2010 14:20:07 GMT From: Alexander Best <arundel@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/114082: [make.conf] default CFLAGS have a blank at the end Message-ID: <201009071420.o87EK7sO036507@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR bin/114082; it has been noted by GNATS.
From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:
Subject: Re: bin/114082: [make.conf] default CFLAGS have a blank at the end
Date: Tue, 7 Sep 2010 14:15:39 +0000
--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
the following patch works for me. it ensures that ${_CPUCFLAGS} doesn't get
appended to CFLAGS, as well as to COPTFLAGS, if it hasn't been defined or is
empty.
cheers.
alex
--
a13x
--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bsd.cpu.mk-and-kern.pre.mk.diff"
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index e3ad18b..fa7fb32 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -6,6 +6,7 @@
.if !defined(CPUTYPE) || empty(CPUTYPE)
_CPUCFLAGS =
+NO_CPU_CFLAGS =
. if ${MACHINE_ARCH} == "i386"
MACHINE_CPU = i486
. elif ${MACHINE_ARCH} == "amd64"
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index d4bdc1f..9929176 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -23,6 +23,10 @@ NM?= nm
OBJCOPY?= objcopy
SIZE?= size
+.if !defined(CPUTYPE) || empty(CPUTYPE)
+_CPUCFLAGS =
+NO_CPU_COPTFLAGS =
+.endif
.if ${CC:T:Micc} == "icc"
COPTFLAGS?= -O
.else
--r5Pyd7+fXNt84Ff3--
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009071420.o87EK7sO036507>
