文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>编译glibc_localedef时碰到的问题

编译glibc_localedef时碰到的问题

时间:2010-06-07  来源:harry_he

在生成交叉编译器时,binutils, gcc-1, glibc-headers, gcc-2, glibc都顺利通过了,但是在编译glibc_localedef的时候,出现了如下错误:

argp-help.c:(.text+0x137c): undefined reference to `argp_fmtstream_point'
argp-help.c:(.text+0x139b): undefined reference to `argp_fmtstream_putc'
...

仔细检查配置选项,没有发现什么问题,只好自己分析这个问题,argp-help.c引用了头文件argp/argp-fmtstream.h, 这些函数的宏定义被包含在宏__OPTIMIZE__中。

#ifdef __OPTIMIZE__
/* Inline versions of above routines.  */

#if !_LIBC
#define __argp_fmtstream_putc argp_fmtstream_putc
#define __argp_fmtstream_puts argp_fmtstream_puts
#define __argp_fmtstream_write argp_fmtstream_write
#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
#define __argp_fmtstream_point argp_fmtstream_point
#define __argp_fmtstream_update _argp_fmtstream_update
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
#endif

于是在配置和编译的时候加上CFLAGS="-g -O2",问题就解决了。

那么这个问题是不是一个glibc的bug呢?还不得而知

相关阅读 更多 +
排行榜 更多 +
打螺丝高手

打螺丝高手

模拟经营 下载
解救火柴人计划安卓版

解救火柴人计划安卓版

体育竞技 下载
鸡生化精英安卓版

鸡生化精英安卓版

飞行射击 下载