clang 的这个问题有人关注过吗?怎么解决?[解决]

https://src.fedoraproject.org/rpms/clang/blob/master/f/0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch
Fedora 打补丁了,以前这个识别是在 llvm 里面,现在独立在 clang 里识别了。
-------------------------------
 
两个 arch 的输出不一样。这直接导致 clang 编译程序,尤其是 clang++ 编译程序时会找不到很多东西。必须增加对应位置的参数。
好像 loongnix 的 clang 也有这个问题。一样缺乏配置内容。
 
x86 的:
[jiangtao@localhost ~]$ clang -v
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
[jiangtao@localhost ~]$

mips64el 的:
<mock-chroot> sh-4.4# clang -v
clang version 6.0.1 (tags/RELEASE_601/final)
Target: mips64el-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
<mock-chroot> sh-4.4#

已邀请:

xuchenghua

赞同来自:

 
cd /usr/lib/gcc/
sudo ln -s mips64el-redhat-linux/ mips64el-redhat-linux-gnu
 
clang -v
clang version 3.7.0 (tags/RELEASE_370/final)
Target: mips64el-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/mips64el-redhat-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/mips64el-redhat-linux-gnu/4.9.3
Selected GCC installation: /usr/bin/../lib/gcc/mips64el-redhat-linux-gnu/4.9.3
Candidate multilib: .;
Selected multilib: .;
 
 

要回复问题请先登录注册