9.0 RC1 linking problem with i386 libs on amd64
Dominic Fandrey
kamikaze at bsdforen.de
Fri Oct 28 20:15:17 UTC 2011
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?
More information about the freebsd-current
mailing list