Monday, June 26, 2006

cross-compiler hell

cross-compiler are a pain in the ass .

kegel.com/crosstool is helpful in such cases

anyway if you ever build powerpc-eabi cross compiler and you get the error

powerpc-eabi-gcc hello.c -static
hello.c:(.text+0x24): undefined reference to `printf'
/opt/ppcsim/lib/gcc-lib/powerpc-eabi/3.2.1/libgcc.a(eabi.o): In function `__eabi':

use the -msim switch when compiling

dont ask me the logic behind it ..but I got it from
http://sources.redhat.com/ml/crossgcc/2002-09/msg00096.html
and it worked for me.