From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 7 14:20:07 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E48CF10656B9 for ; Tue, 7 Sep 2010 14:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B9B628FC14 for ; Tue, 7 Sep 2010 14:20:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o87EK7iw036508 for ; Tue, 7 Sep 2010 14:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o87EK7sO036507; Tue, 7 Sep 2010 14:20:07 GMT (envelope-from gnats) Date: Tue, 7 Sep 2010 14:20:07 GMT Message-Id: <201009071420.o87EK7sO036507@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Alexander Best Cc: Subject: Re: bin/114082: [make.conf] default CFLAGS have a blank at the end X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Best List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2010 14:20:08 -0000 The following reply was made to PR bin/114082; it has been noted by GNATS. From: Alexander Best To: bug-followup@freebsd.org Cc: Subject: Re: bin/114082: [make.conf] default CFLAGS have a blank at the end Date: Tue, 7 Sep 2010 14:15:39 +0000 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline the following patch works for me. it ensures that ${_CPUCFLAGS} doesn't get appended to CFLAGS, as well as to COPTFLAGS, if it hasn't been defined or is empty. cheers. alex -- a13x --r5Pyd7+fXNt84Ff3 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 --r5Pyd7+fXNt84Ff3--