LinuxSir.cn,穿越时空的Linuxsir!

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

为什么会出错/tools/bin/ld: unrecognized option '--as-needed'?

[复制链接]
发表于 2005-1-2 21:12:50 | 显示全部楼层 |阅读模式
我在Debian Sarge RC2编译LFS 5.1.1,第一次编译gcc3.3.3就出错,
错误提示如下:

lfs@www:/mnt/lfs/sources/gcc-build$ ../gcc-3.3.3/configure --prefix=/tools \
> --with-local-prefix=/tools \
> --disable-nls --enable-shared \
> --enable-languages=c
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /mnt/lfs/sources/gcc-build using "mt-frag"
/tools/bin/ld: unrecognized option '--as-needed'
/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.
lfs@www:/mnt/lfs/sources/gcc-build$

我的系统的gcc是3.3.4,是不是不能用高版本的gcc来编译LFS?
发表于 2005-1-2 21:19:53 | 显示全部楼层
应该不是的。
看看你的系统里面有没有cc这个程序。没有的话,那么就做一下从gcc到cc的连接。
 楼主| 发表于 2005-1-2 21:31:28 | 显示全部楼层
先谢谢!等下我试试.
 楼主| 发表于 2005-1-3 12:42:52 | 显示全部楼层
我的/usr/bin有cc文件,连接到/etc/alternatives/gcc,再连接到
/usr/bin/gcc.

看来不是这个问题,继续求解.
发表于 2005-1-3 13:17:54 | 显示全部楼层
 楼主| 发表于 2005-1-3 19:01:00 | 显示全部楼层
i see, thank you.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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