Date: Thu, 16 Sep 2010 01:01:20 +0000 From: Alexander Best <arundel@freebsd.org> To: freebsd-hackers@freebsd.org Subject: traling whitespace in CFLAGS if make.conf:CPUTYPE is not defined/empty Message-ID: <20100916010120.GA49997@freebsd.org>
next in thread | raw e-mail | index | archive | help
--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
hi there,
after discovering PR #114082 i noticed that with CPUTYPE not being defined in
make.conf, `make -VCFLAGS` reports a trailing whitespace for CFLAGS.
the reason for this is that ${_CPUCFLAGS} gets added to CFLAGS even if it's
empty.
the following patch should take care of the problem. i also added the same
logik to COPTFLAGS. although i wasn't able to trigger the trailing whitespace,
it should still introduce a cleaner behaviour.
cheers.
alex
--
a13x
--W/nzBZO5zC0uMSeA
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
--W/nzBZO5zC0uMSeA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100916010120.GA49997>
