Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2010 08:22:24 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Alexander Best <arundel@freebsd.org>
Subject:   Re: traling whitespace in CFLAGS if make.conf:CPUTYPE is not defined/empty
Message-ID:  <201009160822.24460.jhb@freebsd.org>
In-Reply-To: <20100916010120.GA49997@freebsd.org>
References:  <20100916010120.GA49997@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, September 15, 2010 9:01:20 pm Alexander Best wrote:
> 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.

Does the trailing whitespace break anything?  In the past we have had a
non-empty default CPU CFLAGS (e.g. using '-mtune=pentiumpro' on i386 at one
point IIRC) which this change would break.  Unless the trailing whitespace
is causing non-cosmetic problems I'd probably just leave it as it is.

Also, if we were to go with this approach, I would not have changed
kern.pre.mk at all, but set both NO_CPU_CFLAGS and NO_CPU_COPTFLAGS in
bsd.cpu.mk when CPUTYPE was empty.

-- 
John Baldwin



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