From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 16 12:41:24 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 305861065698; Thu, 16 Sep 2010 12:41:24 +0000 (UTC) Date: Thu, 16 Sep 2010 12:41:24 +0000 From: Alexander Best To: John Baldwin Message-ID: <20100916124124.GA52106@freebsd.org> References: <20100916010120.GA49997@freebsd.org> <201009160822.24460.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009160822.24460.jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: traling whitespace in CFLAGS if make.conf:CPUTYPE is not defined/empty X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 12:41:24 -0000 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