Tom*_*ter 5 gentoo gcc toolchain cross-compilation
这在某种程度上是 gentoo 特定的,所以我将在那个上下文中解释它,然后尝试将它抽象为一个通用的 linux 机器。
当我的机器是Athlon64时,我一开始不小心将我的CHOST设置为“i686-pc-linux-gnu”,没有注意。我想将其更改为“x86_64-pc-linux-gnu”。 有一个指南。 它不起作用。
第一步是“重新编译binutils,然后重新编译gcc”
这是说明的问题:
所以我尝试了以下方法:
gcc 编译失败:
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
这是一个 glibc 错误(完成链)。
所以它看起来:
我没有尝试过的步骤,因为它太复杂了我想先征求意见,是:
上面的#4 是否有可能工作?我是否有希望在不完全重新安装的情况下完成此操作?