- UID
- 1029342
- 性别
- 男
|
5)继续make编译
root@fedora:/opt/embedded/build-tools/build-glibc# make
编译出错:
allocatestack.c:247:33: 错误:‘TLS_DTV_UNALLOCATED’未声明(在此函数内第一次使用)
解决方法:
root@fedora:/opt/embedded/build-tools/build-glibc# vi ../glibc-2.13/nptl/allocatestack.c
root@fedora:/opt/embedded/build-tools/build-glibc# vi ../glibc-2.13/elf/dl-tls.c
分别在文件中的include后面添加:
#define TLS_DTV_UNALLOCATED ((void *) -1l)
6)继续make编译
root@fedora:/opt/embedded/build-tools/build-glibc# make
编译出错:
/opt/embedded/tools/lib/gcc/arm-linux/4.6.3/../../../../arm-linux/bin/ld: cannot find -lgcc_eh
解决方法:
root@fedora:/opt/embedded/build-tools/build-glibc# ln -s /opt/embedded/tools/lib/gcc/arm-linux/4.6.3/libgcc.a /opt/embedded/tools/lib/gcc/arm-linux/4.6.3/libgcc_eh.a
7)继续make编译
root@fedora:/opt/embedded/build-tools/build-glibc# make
编译出错:
../sysdeps/ieee754/dbl-64/s_fma.c:152:15: 错误:‘FE_TOWARDZERO’未声明(在此函数内第一次使用)
解决方法:
root@fedora:/opt/embedded/build-tools/build-glibc# vi ../glibc-2.13/sysdeps/ieee754/dbl-64/s_fma.c
在文件中的include后面添加:
#define FE_TOWARDZERO 0xc00000
#define FE_INEXACT 16
8)继续make编译
root@fedora:/opt/embedded/build-tools/build-glibc# make
编译出错:
../sysdeps/ieee754/dbl-64/s_fmaf.c:39:15: 错误:‘FE_TOWARDZERO’未声明(在此函数内第一次使用)
解决方法:
root@fedora:/opt/embedded/build-tools/build-glibc# vi ../glibc-2.13/sysdeps/ieee754/dbl-64/s_fmaf.c
在文件中的include后面添加:
#define FE_TOWARDZERO 0xc00000
#define FE_INEXACT 16
9)继续make编译
root@fedora:/opt/embedded/build-tools/build-glibc# make
root@fedora:/opt/embedded/build-tools/build-glibc# make install_root=$TARGET_PREFIX prefix="" install
10)最后,修改libc.so便完成此步骤
root@fedora:/opt/embedded/build-tools/build-glibc# vi ../../tools/arm-linux/lib/libc.so
找到如下行:
GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
将其改为:
GROUP ( libc.so.6 libc_nonshared.a ) |
|