Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jan 2011 09:50:58 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: [toolchain] ${CC} in share/mk/bsd.cpu.mk
Message-ID:  <20110131095058.GB98011@freebsd.org>
In-Reply-To: <alpine.LNX.2.00.1101310010180.14698@gerinyyl.fvgr>
References:  <20110123130705.GA21973@freebsd.org> <20110130221759.GA38095@freebsd.org> <alpine.LNX.2.00.1101310010180.14698@gerinyyl.fvgr>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110131095058.GB98011>