From owner-freebsd-current@FreeBSD.ORG Fri Oct 28 20:15:17 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 858C2106564A; Fri, 28 Oct 2011 20:15:17 +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 472F78FC0A; Fri, 28 Oct 2011 20:15:16 +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 1A331860DD; Fri, 28 Oct 2011 22:15:15 +0200 (CEST) Message-ID: <4EAB0D53.7090000@bsdforen.de> Date: Fri, 28 Oct 2011 22:15:15 +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> <4EAABF2E.3030709@bsdforen.de> <4EAAF228.1060000@FreeBSD.org> In-Reply-To: <4EAAF228.1060000@FreeBSD.org> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 20:15:17 -0000 On 28/10/2011 20:19, Dimitry Andric wrote: > On 2011-10-28 16:41, Dominic Fandrey wrote: > ... >> ... >> >> 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. > > There are two different problems here. One is that src.conf is read > relatively late, and only when bsd.own.mk is included. Therefore, > src.conf is not the right place to put CC, CXX and so on. I use buildflags (sysutils/bsdadminscripts), hence all my build configuration is included from the make.conf. > The other problem is that the build32 stage uses environment variables > to override CC, CXX, AS and LD for its sub-make (see LIB32WMAKEENV in > Makefile.inc1), adding the necessary flags for 32-bit compilation. > > However, since environment variables are in turn overridden by direct > assignments (like via reading make.conf), the 32-bit compilation flags > get lost when you specify any of CC, CXX, AS or LD in make.conf. > > This latter problem is what my patch attempts to fix, while changing as > little as possible. An alternative is to pass __MAKE_CONF=/dev/null to the 32-bit stage. That should also work in the environment, see make.conf(5) DESCRIPTION§3. I'm testing it now, just out of curiosity. One would probably have to add a _WITHOUT_SRCCONF, to be src.conf compatible, too. --- Makefile.inc1.orig 2011-10-28 22:00:20.000000000 +0200 +++ Makefile.inc1 2011-10-28 22:00:37.000000000 +0200 @@ -282,7 +282,8 @@ LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" \ LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ - AS="${AS} --32" + AS="${AS} --32" \ + __MAKE_CONF=/dev/null .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) > If there aren't any objections, I will commit it this weekend. Thanks! -- 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?