Created attachment 566530 [details] emerge --info '=sys-libs/compiler-rt-7.0.1::gentoo' When building sys-libs/compiler-rt-7.0.1, the compilation of the unit lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o fails with the error message FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o /usr/lib/llvm/7/bin/x86_64-pc-linux-gnu-clang -DVISIBILITY_HIDDEN -pipe -march=native -O2 -Wall -Wno-unused-parameter -m64 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -c /tmp/portage/sys-libs/compiler-rt-7.0.1/work/compiler-rt-7.0.1.src/lib/builtins/mulxc3.c fatal error: error in backend: Cannot select: 0x5614875c4488: f80 = ConstantFP<APFloat(604462909807314587353088)> In function: __mulxc3 clang-7: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 7.0.1 (tags/RELEASE_701/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/7/bin
Created attachment 566532 [details] build.log
I get pretty much the same behavior with =sys-libs/compiler-rt-8.0.0 and clang-8.0.0: [143/284] /usr/lib/llvm/8/bin/x86_64-pc-linux-gnu-clang -DVISIBILITY_HIDDEN -pipe -march=native -O2 -Wall -Wno-unused-parameter -m64 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -c /tmp/portage/sys-libs/compiler-rt-8.0.0/work/compiler-rt-8.0.0.src/lib/builtins/mulxc3.c FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o /usr/lib/llvm/8/bin/x86_64-pc-linux-gnu-clang -DVISIBILITY_HIDDEN -pipe -march=native -O2 -Wall -Wno-unused-parameter -m64 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/mulxc3.c.o -c /tmp/portage/sys-libs/compiler-rt-8.0.0/work/compiler-rt-8.0.0.src/lib/builtins/mulxc3.c fatal error: error in backend: Cannot select: 0x5642b295bed8: f80 = ConstantFP<APFloat(604462909807314587353088)> In function: __mulxc3 clang-8: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 8.0.0 (tags/RELEASE_800/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/8/bin clang-8: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
Could you try replacing -march=native with something specific, and possibly reducing the flags until you figure out which one is specifically responsible for that? You can do that via using: clang -### ${your-flags} -x c - I'm afraid I don't know any tool that reduces this automatically.
I was able to pin it down using the LLVM 'How to submit a bug report'. I created a bug on their tracker as well, as I was already on it: https://bugs.llvm.org/show_bug.cgi?id=41749
Mass-closing bugs reported for removed LLVM versions. Feel free to reopen if the issue still applies and there is no newer report for it.