【发布时间】:2014-01-25 15:32:36
【问题描述】:
我想配置一个自动工具项目来调用非标准
链接器(gold linker),
使用 Linux Mint 16/Ubuntu 13.10 的库存自动工具
我相信我会通过以下方式实现这一目标:
-
libtoolize-ing 项目 - 正在运行
./configure LD=/path/to/my/linker ... etc.
但是这没有效果。 libtoolize 已成功。后
一个标准的./configure; make 我现在看到libtool 正在做
链接:
/bin/bash ./libtool --tag=CXX --mode=link g++ -g -O2 -o helloworld helloworld.o
但是将LD=/path/to/my/linker 传递给configure 没有任何区别。实验上,
我什至跑了:
./configure LD=/does/not/exist
期待引发错误,但我没有。输出包含:
checking if the linker (/does/not/exist -m elf_x86_64) is GNU ld... no
checking whether the g++ linker (/does/not/exist -m elf_x86_64) supports shared libraries... yes
此后,make 继续成功链接,并像以前一样调用 g++。
配置非标准链接器的正确方法是什么?
【问题讨论】:
标签: linker configure autotools libtool