LinuxSir.cn,穿越时空的Linuxsir!

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

[解决]5.4 gcc第一遍出错,大家帮看看

[复制链接]
发表于 2009-3-18 14:28:29 | 显示全部楼层 |阅读模式
宿主是rhel 5.1,参考手册是《Linux 彻底定制指南》[翻译:金步国]
lfs:/mnt/lfs/sources/gcc-build$../gcc-3.4.3/configure --prefix=/tools \
> --libexecdir=/tools/lib --with-local-prefix=/tools \
> --disable-nls --enable-shared --enable-languages=c
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
     target-libstdc++-v3 target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
    (Any other directories should still work fine.)
/tools/bin/ld: unrecognized option '--hash-style=gnu'
/tools/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

########################
原因是binutils补丁打错 = =
 楼主| 发表于 2009-3-18 14:48:13 | 显示全部楼层
环境变量CC?好像没看见啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-18 15:11:42 | 显示全部楼层
export CC=gcc后还是没有啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-18 15:28:06 | 显示全部楼层
google搜到老帖,ln -vs /usr/bin/gcc CC 还是不行,cc -v都可以了,那个符号链接究竟放在哪

/tools/bin/ld/ $LFS/source/gcc-xxx.xxx/  $LFS/source/gcc-build/ 这三个目录下都做了gcc的符号链接,还是报错,配置命令最后加上 cc=gcc 还是不行
回复 支持 反对

使用道具 举报

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

本版积分规则

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