CPUTYPE=native handling
Alexander Best
arundel at freebsd.org
Tue Nov 8 21:39:10 UTC 2011
On Tue Nov 8 11, Roman Divacky wrote:
> On Tue, Nov 08, 2011 at 09:23:52PM +0000, Alexander Best wrote:
> > On Tue Nov 8 11, Roman Divacky wrote:
> > > clang will use "core2" for family=6 and model=15
> > >
> > > check llvm/lib/Support/Host.cpp
> > >
> > > what is the problem? The fact that our gcc from the middle-ages
> > > does not recognize that?
> >
> > actually a few months ago quite a lot of gcc commits happend to add newer
> > optimisations (such as core2) to gcc and some commits aimed at modifying gcc,
> > so it would make the best -march=native choice there is.
> >
> > what's the clang command (similar to gcc -march=native -E -v - </dev/null),
> > one can use to check what actual optimisation clang turns "native" into?
>
> clang -### -march=native will show something like
otaku% clang -### -march=native
FreeBSD clang version 3.0 (trunk 135360) 20110717
Target: x86_64-unknown-freebsd9.0
Thread model: posix
?
>
> "-target-cpu" "k8-sse3"
>
>
> > also there seem to be cross-compilation issues. when people are running i386
> > and want to cross-compile for amd64 and put CPUTYPE=core2 (or any other amd64
> > cpu) into their make.conf, this gets downgraded by bsd.cpu.mk to prescott.
> >
> > see http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/84800
> > and
> > http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg161451.html
>
> If gcc supports nocona now, the conf/84800 patch is ok. The same goes
> with downgrading core2 -> prescott.
>
> I have no idea what gcc supports these days. I think we should just skip
> the downgrading completely for clang as it either supports everything or
> can be made easily to support what it doesnt.
>
> roman
More information about the freebsd-toolchain
mailing list