This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Assistance with choosing cross compiler 'configure' settings, PPC OS X 10.4
- From: xorquewasp at googlemail dot com
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 25 May 2008 16:41:53 +0000
- Subject: Assistance with choosing cross compiler 'configure' settings, PPC OS X 10.4
Hello.
I'm back to working on producing a working PPC -> Intel cross compiler on
OS X 10.4.
I'm having a lot of trouble working out what flags I should be passing to
'configure'. I have this, so far, after some help from Kai Ruottu:
export TARGET=i386-apple-darwin
export PREFIX=/usr/local/gcc-4.2.3/
export PATH=$PATH:${PREFIX}/bin
mkdir ${PREFIX}
mkdir ${PREFIX}/bin
mkdir ${PREFIX}/${TARGET}
mkdir ${PREFIX}/${TARGET}/bin
ln -s /usr/bin/ar ${PREFIX}/${TARGET}/bin/ar
ln -s /usr/bin/as ${PREFIX}/${TARGET}/bin/as
ln -s /usr/bin/ld ${PREFIX}/${TARGET}/bin/ld
ln -s /usr/bin/lipo ${PREFIX}/${TARGET}/bin/lipo
ln -s /usr/bin/nm ${PREFIX}/${TARGET}/bin/nm
ln -s /usr/bin/ranlib ${PREFIX}/${TARGET}/bin/ranlib
ln -s /usr/bin/strip ${PREFIX}/${TARGET}/bin/strip
ln -s /usr/bin/ar ${PREFIX}/bin/${TARGET}-ar
ln -s /usr/bin/as ${PREFIX}/bin/${TARGET}-as
ln -s /usr/bin/ld ${PREFIX}/bin/${TARGET}-ld
ln -s /usr/bin/lipo ${PREFIX}/bin/${TARGET}-lipo
ln -s /usr/bin/nm ${PREFIX}/bin/${TARGET}-nm
ln -s /usr/bin/ranlib ${PREFIX}/bin/${TARGET}-ranlib
ln -s /usr/bin/strip ${PREFIX}/bin/${TARGET}-strip
#
# These lines are not right. See below.
#
ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib ${PREFIX}/lib
ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/include ${PREFIX}/include
cd build-gcc
../gcc-4.2.3/configure \
--disable-libssp \
--disable-gomp \
--target=${TARGET} \
--prefix=${PREFIX} \
--enable-languages=c,ada
make all-gcc
These settings are not correct: the compiler will build correctly but upon
installation, files are installed into /Developer/SDKs/MacOSX10.4u.sdk/usr/lib
thanks to the symlinks.
I think I need to use some combination of --with-sysroot or --with-build-sysroot
in order to tell GCC to look in /Developer/SDKs/MacOSX10.4u.sdk/usr for headers
and libraries for compilation but never to actually install anything into there.
Unfortunately, I can't work out the correct flags from the documentation and
using a brute force approach isn't really feasible as a compilation takes over
an hour.
Any assistance or further insight would be appreciated.