From owner-freebsd-current@FreeBSD.ORG Fri Oct 28 14:41:53 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 519051065674 for ; Fri, 28 Oct 2011 14:41:53 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.server1.bsdforen.de (bsdforen.de [82.193.243.81]) by mx1.freebsd.org (Postfix) with ESMTP id 121108FC22 for ; Fri, 28 Oct 2011 14:41:52 +0000 (UTC) Received: from mobileKamikaze.norad (HSI-KBW-091-089-161-008.hsi2.kabel-badenwuerttemberg.de [91.89.161.8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.server1.bsdforen.de (Postfix) with ESMTPSA id D2D378600C; Fri, 28 Oct 2011 16:41:51 +0200 (CEST) Message-ID: <4EAABF2E.3030709@bsdforen.de> Date: Fri, 28 Oct 2011 16:41:50 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111006 Thunderbird/7.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <4EA80BD3.7000202@bsdforen.de> <4EA81B90.60501@FreeBSD.org> In-Reply-To: <4EA81B90.60501@FreeBSD.org> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: 9.0 RC1 linking problem with i386 libs on amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 14:41:53 -0000 On 26/10/2011 16:39, Dimitry Andric wrote: > On 2011-10-26 15:32, Dominic Fandrey wrote: >> I haven't tried to dig into this. Only "unusual" properties of the system >> are my non-default MAKEOBJDIRPREFIX and the use of ccache. >> >> # uname -a >> FreeBSD AryaStark.norad 9.0-RC1 FreeBSD 9.0-RC1 #0: Wed Oct 26 13:46:13 CEST 2011 root@AryaStark.norad:/usr/obj/GENERIC/amd64/usr/src/sys/GENERIC amd64 >> >> # make -VCC -VCPUTYPE -VCFLAGS >> /usr/local/bin/ccache clang >> athlon64-sse3 >> -O2 -pipe -march=athlon64-sse3 > > How are you setting CC and/or CFLAGS, precisely? Depending on how you > do it, the settings might not be propagated correctly to the build32 > stage. Like that: .if ${.CURDIR:M/usr/src} || ${.CURDIR:M/usr/src/*} CC=clang CXX=clang++ CPP=clang-cpp NO_WERROR= WERROR= .endif I had hoped that the .ifdef construction from the wiki was dated. I suppose it's emulating setting CC in the environment instead of in the make/src.conf. > Also, if you force CFLAGS to have -march=athlon64-sse3, I'm not > sure if the build32 stage can even work correctly. Just specify > CPUTYPE, that should be enough. That's what I do. I don't touch CFLAGS. > In any case, you can try out the attached patch, which should take care > of passing CC to the build32 stage correctly. I tried CC?=, but that doesn't work, because apparently make always initializes CC before parsing makefiles. I figure that means the !defined(CC) clause in the .ifdef construction is never true and thus obsolete. I didn't try it, though. Your patch works for me. > I would really like to have this in head, and even stable/9. It makes > it possible to just set CC in make.conf, without .ifdef trickery. Works > nicely for clang, too. :) Seconded! -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?