Glibc 编译出错解决方案

../sysdeps/i386/fpu/s_frexp.S: Assembler messages:
../sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for “.ifdef”
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1′
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1′
../sysdeps/i386/fpu/s_frexp.S:66: Error: Missing symbol name in directive
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1′
../sysdeps/i386/fpu/s_frexp.S:66: Error: Missing symbol name in directive
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.’
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1′
../sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `’ in .size directive
../sysdeps/i386/fpu/s_frexp.S:66: Error: “.endif” without “.if”
../sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx’ after expression
make[2]: *** [/opt/mylinux/build/glibc-build/math/s_frexp.os] Error 1
make[2]: Leaving directory `/opt/mylinux/build/glibc-2.12.2/math’
make[1]: *** [math/subdir_lib] Error 2
make[1]: Leaving directory `/opt/mylinux/build/glibc-2.12.2′
make: *** [all] Error 2

在编译前执行的步骤:

tar xvf sources/glibc-2.12.2.tar.bz2 -C build/
mkdir build/glibc-build
cd build/glibc-build
echo “CFLAGS += -march=i686 -mtune=native” > configparms
../glibc-2.12.2/configure –prefix=/tools –enable-kernel=2.6.0(此处写2.6.0或者现在的系统版本都不行。我的系统是2.6.35, 准备用的内核是2.6.37) –without-gd
make
就在make 的时候报了开头的错误。

我的binutils 的版本是2.21 gcc的版本是4.5.2, 都是手动编译的,检查无误。glibc的文件也没有损坏。

############################################################

按照这个patch解决咯!:http://www.eglibc.org/archives/patches/msg00073.html

又:我是手工修改的glibc的代码。

Index: sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
— sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include

#include

+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif

/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: nptl/sysdeps/pthread/pt-initfini.c
===================================================================
— nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm (”\n#include \”defs.h\”");

+asm (”\n#if defined __i686 && defined __ASSEMBLER__”);
+asm (”\n#undef __i686″);
+asm (”\n#define __i686 __i686″);
+asm (”\n#endif”);
+
/* The initial common code ends here. */
asm (”\n/*@HEADER_ENDS*/”);

也不算吃亏吧,学了一下手动打patch


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值