Date: Fri, 28 Oct 2011 22:15:15 +0200 From: Dominic Fandrey <kamikaze@bsdforen.de> To: Dimitry Andric <dim@FreeBSD.org> Cc: freebsd-current@freebsd.org Subject: Re: 9.0 RC1 linking problem with i386 libs on amd64 Message-ID: <4EAB0D53.7090000@bsdforen.de> In-Reply-To: <4EAAF228.1060000@FreeBSD.org> References: <4EA80BD3.7000202@bsdforen.de> <4EA81B90.60501@FreeBSD.org> <4EAABF2E.3030709@bsdforen.de> <4EAAF228.1060000@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EAB0D53.7090000>
