【问题标题】:Edit to GCC spec file is not being used during compilation编译期间未使用对 GCC 规范文件的编辑
【发布时间】:2017-06-05 19:57:42
【问题描述】:

我正在阅读当前的 LFS(从零开始的 Linux)一书,第 6.10 节。

当我尝试编译虚拟文件时,它失败了

/tools/lib/gcc/i686-pc-linux-gnu/6.2.0/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status

在我的调查中,我注意到我编写的规范文件在执行 GCC 时没有被使用。例如

root:~# gcc -v
Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/6.2.0/specs
...

root:~# sed -n '/startfile_prefix_spec/{N;p}' /tools/lib/gcc/i686-pc-linux-gnu/6.2.0/specs
*startfile_prefix_spec:
/usr/lib/

root:~# gcc -dumpspecs | sed -n '/startfile_prefix_spec/{N;p}'
*startfile_prefix_spec:

gcc 读取我创建的 spec 文件有问题吗?

【问题讨论】:

  • 我修复了错误问题。 /usr/lib/libgcc_s.so{,.1} 指向了错误的位置,因此找不到它。

标签: linux gcc compilation linker loader


【解决方案1】:

我修复了错误问题。 /usr/lib/libgcc_s.so{,.1} 指向了错误的位置,因此找不到它。

【讨论】:

    猜你喜欢
    • 2021-06-03
    • 2012-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-08
    • 1970-01-01
    • 1970-01-01
    • 2012-02-24
    相关资源
    最近更新 更多