Installing gcc i686->Powerpc Cross-compiler

Xianglong Huang xlhuang@cs.umass.edu
Sun Apr 8 14:03:00 GMT 2001


Hi,
I am trying to install a cross-compiler for powerpc on my i686 Linux
box. My installation follows the following steps,

host=i686-pc-linux-gnu
target=powerpc-unknown-eabi
prefix=/home/psim/applications/psim

mkdir build-binutils build-gcc build-newlib build-gdb

# Configure, build and install binutils
 cd build-binutils
../binutils-2.9/configure --target=$target --prefix=$prefix -v
make all install

# Configure, build and install gcc
cd ../build-gcc
../gcc-2.8.1/configure --target=$target --prefix=$prefix -v
make all install

# Configure, build and install newlib 
cd ../build-newlib 
../newlib-1.9/configure --target=$target --prefix=$prefix -v
set path= ( $prefix/bin $path ) 
make all install

cd ../build-gdb 
../gdb+dejagnu-20010406/configure --target=$target --prefix=$prefix -v
make all install

Then I tried to compile a very simple helloworld.c by this gcc

cat  helloworld.c
main()
{
printf("Hello world.\n");
}              

powerpc-unknown-eabi-gcc helloworld.c
/home/psim/applications/psim/powerpc-unknown-eabi/bin/ld: warning:
cannot find entry symbol _start; defaulting to 01800074
/tmp/ccgFre5i1.o: In function `main':
/tmp/ccgFre5i1.o(.text+0x24): undefined reference to `printf'   

Any idea? Suggestion? Thanks.

-- 
Long(Xianglong Huang)
Computer Science Dept.
UMass-Amherst
Phone: (413)5450256



More information about the Gcc-help mailing list