How to build crosscompilers |
|
|
Stolen from http://www.ifp.uiuc.edu/~nakazato/tips/xgcc.html
export TARGET=powerpc-elf export PREFIX=/usr/local/$TARGET export PATH=$PATH:$PREFIX/bin
tar xjf binutils-*.bz2 mkdir build-binutils pushd build-binutils ../binutils-*/configure --target=$TARGET --prefix=$PREFIX make all make install popd
tar xjf gcc-*.bz2 mkdir build-gcc pushd build-gcc ../gcc-*/configure --target=$TARGET --prefix=$PREFIX --without-headers --with-newlib --with-gnu-as --with-gnu-ld make all-gcc make install-gcc popd
tar xzf newlib-*.gz mkdir build-newlib pushd build-newlib ../newlib-*/configure --target=$TARGET --prefix=$PREFIX make all make install popd
pushd build-gcc ../gcc-*/configure --target=$TARGET --prefix=$PREFIX --with-newlib --with-gnu-as --with-gnu-ld --disable-shared --disable-libssp make all make install popd
tar xjf gdb-*.bz2 mkdir build-gdb pushd build-gdb ../gdb-*/configure --target=$TARGET --prefix=$PREFIX --enable-sim-powerpc --enable-sim-stdio make all make install popd
powerpc-elf-gcc hello.c -o hello
powerpc-elf-run hello |
(c) Kartikaya Gupta, 2004-2024. User comments owned by their respective posters. All rights reserved. You are accessing this website via IPv4. Consider upgrading to IPv6! |