Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2011 22:32:53 +0100
From:      Roman Divacky <rdivacky@freebsd.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: CPUTYPE=native handling
Message-ID:  <20111108213253.GA31062@freebsd.org>
In-Reply-To: <20111108212352.GA39160@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>

index | next in thread | previous in thread | raw e-mail

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

"-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


home | help

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