LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 909|回复: 1

CLFS问题请教,龙芯2E,PowerPC,ARM

[复制链接]
发表于 2009-2-13 10:18:50 | 显示全部楼层 |阅读模式
CLFS问题请教
昨个在龙芯2E盒子和一台PowerPC上进行CLFS ARM,遇到gnu89-inline的问题,描述如下:

CLFS Target是gcc4.3.2,glibc2.8,在不用gnu89-inline的情况下,inline错误,因此加上-fgnu89-inline,此时

2E盒子上,第一次Host是Debian etch,gcc4.1.1,显然这个版本gcc不支持-fgnu89-inline(好像4.1.3后才支持),glibc编译失败
第二次,升级2E到Debian Lenny,gcc4.3,etch官方的源竟然没有gcc4.2以上版本,汗,不过总算编译通过,完成CLFS

问题是,另一台PowerPC上gcc只有4.0版本,如何跳过-fgnu89-inline问题?

我可不想再交叉编译一个4.1.3版本以上的powerpc gcc,也没有现成的安装包,那台PowerPC是定制的linux,相当老,原来做4.0版本都烦死

要制作的是ARM的
发表于 2009-2-13 20:29:32 | 显示全部楼层
楼主,一般情况下用作 CLFS 宿主的机器是选性能比较强的。
"龙芯2E,PowerPC" 是您最好的机器?

一个概念性错误,Target glibc2.8 是由交叉编译工具链 编译的,不是您宿主上的 gcc 编译的。
您应该看看是否少打补丁。


http://gcc.gnu.org/onlinedocs/gc ... ialect-Options.html
-fgnu89-inline
    The option -fgnu89-inline tells GCC to use the traditional GNU semantics for inline functions when in C99 mode. See An Inline Function is As Fast As a Macro. This option is accepted and ignored by GCC versions 4.1.3 up to but not including 4.3. In GCC versions 4.3 and later it changes the behavior of GCC in C99 mode. Using this option is roughly equivalent to adding the gnu_inline function attribute to all inline functions (see Function Attributes).

    The option -fno-gnu89-inline explicitly tells GCC to use the C99 semantics for inline when in C99 or gnu99 mode (i.e., it specifies the default behavior). This option was first supported in GCC 4.3. This option is not supported in C89 or gnu89 mode.

    The preprocessor macros __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__ may be used to check which semantics are in effect for inline functions. See Common Predefined Macros.

您可能需要使用 "-fno-gnu89-inline" 参数。

PS: 您应该给出使用的手册地址、详细错误信息。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表