From owner-freebsd-toolchain@FreeBSD.ORG Tue Nov 8 21:32:59 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D6241065675; Tue, 8 Nov 2011 21:32:59 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 5DEF58FC08; Tue, 8 Nov 2011 21:32:59 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 6E8317F383F; Tue, 8 Nov 2011 22:32:53 +0100 (CET) Date: Tue, 8 Nov 2011 22:32:53 +0100 From: Roman Divacky To: Alexander Best Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111108212352.GA39160@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-toolchain@freebsd.org, Dimitry Andric Subject: Re: CPUTYPE=native handling X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2011 21:32:59 -0000 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 - 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