[toolchain] ${CC} in share/mk/bsd.cpu.mk
Alexander Best
arundel at freebsd.org
Mon Jan 31 09:50:58 UTC 2011
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
More information about the freebsd-toolchain
mailing list