apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@codemass.com>
Subject APR on Leopard (works, but has issues)
Date Wed, 31 Oct 2007 00:12:10 GMT
Hi Everyone, I've been testing our code on Darwin 9/Leopard:

Good news: it works and we can actually create universal binaries:

.libs/libapr-1.0.dylib: Mach-O universal binary with 3 architectures
.libs/libapr-1.0.dylib (for architecture ppc7400):	Mach-O dynamically  
linked shared library ppc
.libs/libapr-1.0.dylib (for architecture i386):	Mach-O dynamically  
linked shared library i386
.libs/libapr-1.0.dylib (for architecture x86_64):	Mach-O 64-bit  
dynamically linked shared library x86_64

Bad news:

1) The autoconf code that selects the int_value and long_value aren't  
consistent for all three architectures (ppc/i386/x86_64). It should be  
choosing long_value="long long" but it's picking "long" instead,  
probably because that would also be correct on my i386/x86_64 machine.  
That'll need to be fixed.

2) The atomics code breaks presumably because the compiler/linker  
tries to link the same asm in all three architectures. Workaround: -- 

How did I do it:

CFLAGS="-arch ppc -arch i386 -arch x86_64 -pipe -Wall -g" \
LDFLAGS="-arch ppc -arch i386 -arch x86_64 -pipe" \
./configure --enable-nonportable-atomics=no
make clean
make install

I'll poke around in the autoconf code to see if I can fix the  
int_value/long_value selector, but so far I haven't had any  
inspirations. As for the atomics issue I'm not sure how to solve this,  
any ideas?


View raw message