glibc compile

get three packages from http://ftp.gnu.org/gnu/glibc/.

glibc-2.12.1.tar.bz2

glibc-linuxthreads-2.5.tar.bz2()

glibc-ports-2.9.tar.bz2

 

1. CC=arm-none-linux-gnueabi-gcc CFLAGS="-mfloat-abi=softfp -O2" /home/ben/Works/Software/glibc-2.12.1/configure --build=i686-linux --host=arm-linux --prefix=/home/ben/Works/Tools/glibc6-armlibls --enable-add-ons=nptl,/home/ben/Works/Software/glibc-ports-2.9/

2. make

3. make install

 

when get error like:

[1]

checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... (cached) /bin/grep -E
checking for ANSI C header files... (cached) no
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking cpuid.h usability... no
checking cpuid.h presence... no
checking for cpuid.h... no
configure: error: gcc must provide the <cpuid.h> header

workaround:

get the cpuid.h file from official GCC respositories > (http://gcc.gnu.org/viewcvs/tags/gcc_4_4_2_release/gcc/config/i386/cpuid.h?view=co ) > and put it into arm-2007q3-csr-build/arm-none-linux-gnueabi/libc/usr/include. > glibc should compile without problem now.


[2]
"glibc cannot be compiled without optimization"
solution: specific CFLAGS when configure glibc with -O2, (refer to http://www.cygwin.com/ml/libc-alpha/2007-09/msg00032.html)

[3] error: #error "TLS support is required."
solution:remove definition in glibc-ports-2.9/sysdeps/arm/nptl/tls.h

No idea for this phenomenon, use codesourcery compile scripts.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值