From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 16 12:38:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DA661065670; Thu, 16 Sep 2010 12:38:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5F75C8FC0C; Thu, 16 Sep 2010 12:38:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 01BE346B7E; Thu, 16 Sep 2010 08:38:06 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 85BDF8A04F; Thu, 16 Sep 2010 08:38:04 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 16 Sep 2010 08:22:24 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20100916010120.GA49997@freebsd.org> In-Reply-To: <20100916010120.GA49997@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201009160822.24460.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 16 Sep 2010 08:38:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Alexander Best 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:38:07 -0000 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