traling whitespace in CFLAGS if make.conf:CPUTYPE is not
defined/empty
Alexander Best
arundel at freebsd.org
Thu Sep 16 12:41:24 UTC 2010
On Thu Sep 16 10, John Baldwin wrote:
> 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.
the PR claims that a few ports are having problems with trailing whitespaces
during ./configure, but personally i haven't experienced any problems.
however i don't use the port system a lot so i'm not really able to comment on
that.
cheers.
alex
>
> 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
--
a13x
More information about the freebsd-hackers
mailing list