【发布时间】:2015-05-08 10:03:28
【问题描述】:
我想为 startfile 指定 GCC 的搜索目录和
endfile:crt1.o、crti.o 和 crtn.o。在命令行传递-B
GCC 驱动程序有效,但不方便。如何修改规格
文件(lib/gcc/x86_64-unknown-linux-gnu/4.9.2/specs)来指定startfile的搜索路径?
我尝试将-B 选项添加到startfile 规范并得到错误:
ld: unrecognized option '-B/gsc/btl/linuxbrew/lib'
然后我尝试将-B 选项添加到cc1 规范并得到错误:
cc1: error: command line option '-B/gsc/btl/linuxbrew/lib' is valid
for the driver but not for C
如果无法通过 specs 文件执行此操作,是否有 GCC 的环境变量或配置选项可以实现相同的目标?
我在我的主目录中安装了最新版本的glibc。一切都很好。我已经修改了specs 文件以链接到glibc 的新版本,但它仍然链接到startfile 和endfile 的/usr 中的旧系统版本。
这是gcc-help 邮件列表中的the unanswered question。这是一个相关的 Linuxbrew 错误,gfortran is broken with stand alone Linuxbrew,以及一个建议的修复,gcc, binutils: link to Cellar instead of system libs。
谢谢,
肖恩
【问题讨论】:
标签: gcc glibc search-path