|
楼主 |
发表于 2009-3-2 16:54:37
|
显示全部楼层
生成glibc库
$root@host:/home/arm/build-tools/build-glibc# CC=arm-linux-gcc ../glibc-2.6.1/configure --host=$TARGET --prefix=”/usr” --enable-add-ons --with-headers=${TARGET_PREFIX}/include
--cache-file=config.cache
$root@host:/home/arm/build-tools/build-glibc# make
$root@host:/home/arm/build-tools/build-glibc# make install_root=${TARGET_PREFIX} prefix=”” install
对libc.so作出修改:
$root@host:/home/arm/build-tools/build-glibc# cd ${TARGET_PREFIX}/lib
$root@host:/home/arm/tools/arm-linux/lib# vi libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
将GROUP这一行的内容改为:
GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.2 ) )
$root@host:/home/arm/tools/arm-linux/lib# cat libpthread.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libpthread.so.0 /lib/libpthread_nonshared.a )
将GROUP这一行的内容改为:
GROUP (libpthread.so.0 libpthread_nonshared.a )
生成完整的编译工具:
$root@host:/home/arm/tools/arm-linux/lib# cd ${PRJROOT}/build-tools/build-gcc
$root@host:/home/arm/build-tools/build-gcc# ../gcc-4.2.1/configure --target=$TARGET --prefix=${PREFIX} --enable-shared
--enable-languages=c,c++ --with-threads=posix
$root@host:/home/arm/build-tools/build-glibc# make all 此处就出现上述错误
我环境是gcc-4.2.1;glibc-2.6.1;binutils-2.18
宿主机是
linux-2d4a:/home/arm/build-tools # uname -a
Linux linux-2d4a 2.6.25.5-1.1-pae #1 SMP 2008-06-07 01:55:22 +0200 i686 athlon i386 GNU/Linux |
|