From owner-freebsd-toolchain@FreeBSD.ORG Mon Jan 31 09:50:58 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1EDE51065672; Mon, 31 Jan 2011 09:50:58 +0000 (UTC) Date: Mon, 31 Jan 2011 09:50:58 +0000 From: Alexander Best To: Gerald Pfeifer Message-ID: <20110131095058.GB98011@freebsd.org> References: <20110123130705.GA21973@freebsd.org> <20110130221759.GA38095@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-toolchain@freebsd.org Subject: Re: [toolchain] ${CC} in share/mk/bsd.cpu.mk X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 09:50:58 -0000 On Mon Jan 31 11, Gerald Pfeifer wrote: > On Sun, 30 Jan 2011, Alexander Best wrote: > > i might have described things a bit too complicated. basically i want to > > have CPUTYPE ?= core2 in my make.conf. clang is capable of producing > > core2 specific code, however core2 always gets downgraded by > > share/mk/bsd.cpu.mk to nocona in order not to confuse gcc. > > > > any chance of fixing this? > > I guess one of those extern compilers Robert has in mind should > be lang/gcc46 from the Ports Collection which is perfectly happy > to generate core2 code. I agree we need good infrastructure to > support such cases. i just thought we could make the instructions in share/mk/bsd.cpu.mk which downgrades the CPUTYPE to nocona gcc specific. but for some reason that doesn't seem to work. :( Index: bsd.cpu.mk =================================================================== --- bsd.cpu.mk (revision 218104) +++ bsd.cpu.mk (working copy) @@ -55,7 +55,7 @@ . elif ${CPUTYPE} == "k7" CPUTYPE = athlon . endif -. elif ${MACHINE_CPUARCH} == "amd64" +. elif ${MACHINE_CPUARCH} == "amd64" && ${CC} != "clang" . if ${CPUTYPE} == "prescott" || ${CPUTYPE} == "core2" CPUTYPE = nocona . endif ...and still with clang as compiler CPUYTEP gets reset to nocona. cheers. alex > > Gerald -- a13x