On 28 Jan 2008, at 8:36 PM, John Carter wrote:
Build gcc with the libc that goes into the target.
Thanks for the idea, but I was able to bypass libc;
I was going to email the list with my solution as
soon as I ironed out some kind of incompatibility
I'm getting in object code between C++ compilers
(of the same version). Though I haven't figured
it out, this is the simple solution derived from
http://www.osdev.org/wiki/GCC_Cross-Compiler
tar xjf binutils-2.17.tar.bz2
mv binutils-2.17 src
mkdir build
cd build
export PREFIX=/usr/local/xgcc
export TARGET=i686-elf
../src/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make
sudo make install
--------------------------------
tar xjf gcc-core-4.1.2.tar.bz2 && tar xjf gcc-g++-4.1.2.tar.bz2
mv gcc-4.1.2 src
mkdir build
cd build
export PATH=$PATH:$PREFIX/bin
../src/configure --target=$TARGET --prefix=$PREFIX --disable-nls --
enable-languages=c,c++ --without-headers
MACOSX_DEPLOYMENT_TARGET=10.4 make all-gcc
sudo make install-gcc
That MACOSX_DEPLOYMENT_TARGET=10.4 is necessary on Mac OS X 10.5
In any case, I wish that the configuration process/switches were cleaned
up and documented more.
Sincerely,
Michael Witten