2011年4月16日 星期六

Building native compiler with cross compiler

gcc-v4.3.3/gcc-v4.4.1

ld: crti.o: No such file: No such file or directory
FIX: I didn't copy the library/header files in configured sysroot, or sysroot configured is not correct. The library/header files are located in the directory of cross compiler, e.g. arm-2009q1/arm-none-linux-gnueabi/libc/ for arm-2009q1 (glibc).

gcc: error trying to exec 'cc1': execvp: No such file or directory
FIX: libgcc configure will looks for gcc/ar/nm/... in directory specified by --with-build-time-tools. In my case, the value is incorrect.

/opt/codesourcery/arm-none-linux-gnueabi/libc/usr/lib/crt1.o: In function `_start':
(.text+0x30): undefined reference to `__libc_csu_fini'
/opt/codesourcery/arm-none-linux-gnueabi/libc/usr/lib/crt1.o: In function `_start':
(.text+0x38): undefined reference to `__libc_csu_init'
collect2: ld returned 1 exit status
FIX: In my case, the library is striped...

2 則留言:

匿名 提到...

So how to solve the libc problem? What does it mean the library is striped?

Thanks for the help.

mkl 提到...

don't strip it.

refer to:
http://linux.about.com/library/cmd/blcmdl1_strip.htm