From owner-freebsd-stable@FreeBSD.ORG Sun Dec 30 14:04:02 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E025350 for ; Sun, 30 Dec 2012 14:04:02 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id E41F18FC08 for ; Sun, 30 Dec 2012 14:04:01 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TpJUd-0000JQ-8a for freebsd-stable@freebsd.org; Sun, 30 Dec 2012 15:03:59 +0100 Received: from h253044.upc-h.chello.nl ([62.194.253.44] helo=pinky) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TpJUd-0008VV-BC for freebsd-stable@freebsd.org; Sun, 30 Dec 2012 15:03:59 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-stable@freebsd.org Subject: Re: FreeBSD 9 (amd64) buildworld stage 4.2 fails with clang: unknown target cpu i686 References: <50DED9BA.1000400@internecto.net> Date: Sun, 30 Dec 2012 15:03:57 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: <50DED9BA.1000400@internecto.net> User-Agent: Opera Mail/12.12 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.0 X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.1 X-Scan-Signature: 4a4e1dd80dce9ac0d9378b25a0c059e8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 14:04:02 -0000 Just some kind of me-too-message. I had weird things with clang like top crashing as root (but not as another user) and various ports failing to run with 'illegal instruction' errors until I removed CPUTYPE?=native. CPU: Pentium(R) Dual-Core CPU E5200 I did not investigate further, but never had this problem with gcc. This all was on 9-STABLE/amd64. Ronald. On Sat, 29 Dec 2012 12:53:30 +0100, Mark van Dijk wrote: > Hello everyone, > > I'm running FreeBSD 9.1-PRERELEASE and today I synchronised my /usr/src > directory with the svn_stable_9 branch on gitorious [1]. I am using > ccache. > > My /etc/make.conf contains the following: > > -------------------------8<------------------------- > CPUTYPE?=native > CFLAGS=-O3 -pipe > COPTFLAGS=-O -fno-strict-aliasing -pipe > MAKE_JOBS_NUMBER=4 > CC=clang > CXX=clang++ > CPP=clang-cpp > NO_WERROR= > WERROR= > MAKE_SHELL?=sh > INSTALL=install -C > # from ccache-howto-freebsd.txt > .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) > .if !defined(NOCCACHE) > CC:=${CC:C,^clang,/usr/local/libexec/ccache/world/clang,1} > CXX:=${CXX:C,^clang\+\+,/usr/local/libexec/ccache/world/clang++,1} > CCACHE_DIR:=/usr/sysccache > .endif > .endif > .if ${CC:T} == "clang" > CFLAGS+= -Qunused-arguments > .endif > -------------------------8<------------------------- > > The output from make is too long to post inline so you can find the > relevant portion here: > http://sprunge.us/BfWJ > > I suspect that the error is caused by -march=native, my CPU is an Intel > Core i5. > > I'll admit that I did modify my make.conf right before building. It > already *did* contain the CC/CXX/CPP lines for clang but the ccache > portion was slightly different. It used to contain the literal contents > of ccache-howto-freebsd.txt: > > CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1} > CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1} > > Today I re-read that howto and it states: > "You can replace cc and c++ with the compilers of your choice. > (remember that only GCC and Clang can build world and kernel)" > > So I updated those two lines and replaced cc/c++ with clang/clang++. I > didn't get the make errors before. So I moved those two lines back, did > rm -rf /usr/obj/* and started another make buildworld which is still > running. > > I always thought that specifying 'CPUTYPE?=' in the Makefile is the > right way to prevent issues like this. So did I do something wrong, or > is this some kind of ccache issue, or is this a legitimate bug? > > Please shed some light on this, thanks. > > Mark van Dijk > the Netherlands > > [1] git://gitorious.org/freebsd/freebsd.git > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"