Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2011 21:39:10 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: CPUTYPE=native handling
Message-ID:  <20111108213910.GA42560@freebsd.org>
In-Reply-To: <20111108213253.GA31062@freebsd.org>
References:  <20111108002556.GA91218@freebsd.org> <4EB8E07B.5070908@FreeBSD.org> <20111108153856.GA90966@freebsd.org> <20111108210420.GA37161@freebsd.org> <20111108210905.GA28416@freebsd.org> <20111108212352.GA39160@freebsd.org> <20111108213253.GA31062@freebsd.org>

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



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