Hi,
in our compiler build script for coreboot we used the following to get
GMP and mpfr working on both OS X 10.5 and 10.6..
Note the hard code on ABI=32 (because the configure script misdetects
this on 10.5) and the -force_cpusubtype_ALL for MPFR
Stefan
GMP:
[..]
if [ `uname` = "Darwin" ]; then
# generally the OS X compiler can create x64 binaries.
# Per default it generated i386 binaries in 10.5 and x64
# binaries in 10.6 (even if the kernel is 32bit)
# For some weird reason, 10.5 autodetects an ABI=64 though
# so we're setting the ABI explicitly here.
OPTIONS="ABI=32"
touch .architecture_check.c
gcc .architecture_check.c -c -o .architecture_check.o
ARCH=`file .architecture_check.o |cut -f5 -d\ `
test "$ARCH" = "x86_64" && OPTIONS="ABI=64"
rm .architecture_check.c .architecture_check.o
fi
../${GMP_DIR}/configure --disable-shared --prefix=$TARGETDIR $OPTIONS
[..]
MPFR:
test `uname` = "Darwin" && CFLAGS="$CFLAGS -force_cpusubtype_ALL"
cd build-mpfr
../${MPFR_DIR}/configure --disable-shared --prefix=$TARGETDIR \
--infodir=$TARGETDIR/info \
--with-gmp=$DESTDIR$TARGETDIR CFLAGS="$HOSTCFLAGS"
$MAKE
$MAKE install DESTDIR=$DESTDIR
[..]
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected] • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
--
ptxdist mailing list
[email protected]