标题: configure为什么显示gcc不用gld,而要用sun的ld呢? [打印本页] 作者: xworm 时间: 2003-05-14 22:54 标题: configure为什么显示gcc不用gld,而要用sun的ld呢? 我试着编译binutils-2.13。configure的时候,虽然没有中断(报错),但我在滚屏的信息中,发现下面这些:
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
这两行关于ld的信息,我也不明白,我的PATH变量中,/opt/sfw/bin是设置在前面的(gld就在这个目录),为什么configure要用/usr/ccs/bin/ld?(我不想用链接的方式解决这个问题)
可是也没有出现/usr/ccs/bin这样的绝对路径;specs文件中,在唯一一个出现/usr/ccs/bin的地方,我曾经试着改成/usr/local/bin,但gcc -v输出没变化。其他出现绝对路径的地方,基本上都是针对库的。作者: xworm 时间: 2003-05-15 21:19 标题: configure为什么显示gcc不用gld,而要用sun的ld呢? 有点眉目了:
http://sunland.gsfc.nasa.gov/info/gcc/Collect2.html
我把有意思的地方摘录如下:
The program collect2 is installed as ld in the directory where the passes of the compiler are installed. When collect2 needs to find the real ld, it tries the following file names:
`real-ld' in the directories listed in the compiler's search directories.
`real-ld' in the directories listed in the environment variable PATH.
The file specified in the REAL_LD_FILE_NAME configuration macro, if specified.
`ld' in the compiler's search directories, except that collect2 will not execute itself recursively.
`ld' in PATH.