Created attachment 525450 [details] emerge --info I know llvm is not keyworded on ppc/ppc64, but it would still be nice to build llvm-6.0.0 via the regular ebuilds, as this works fine with llvm-5.0.1 too. Building 6.0.0 vanilla from source (http://llvm.org/docs/CMake.html#quick-start) works too. I tested following combinations: llvm-6.0.0 built w. gcc-7.3.0 / amd64 ... works! llvm-6.0.0 built w. gcc-6.4.0 / amd64 ... works! llvm-6.0.0 built w. gcc-7.3.0 / ppc64 ... this bug llvm-5.0.1 built w. gcc-7.3.0 / ppc64 ... works! llvm-6.0.0 built (vanilla) w. gcc-7.3.0 / ppc64 ... works! Looks like an amd64-only flag "-mno-bmi" is emitted on ppc64. This does not happen with llvm-5.0.1. -- Check for working C compiler: /usr/bin/powerpc64-unknown-linux-gnu-gcc -- Check for working C compiler: /usr/bin/powerpc64-unknown-linux-gnu-gcc -- broken CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:51 (message): The C compiler "/usr/bin/powerpc64-unknown-linux-gnu-gcc" is not able to compile a simple test program. It fails with the following output: Change Dir: /var/tmp/portage/sys-devel/llvm-6.0.0/work/llvm-6.0.0.src-abi_ppc_64.ppc64/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/ninja" "cmTC_f22c6" [1/2] Building C object CMakeFiles/cmTC_f22c6.dir/testCCompiler.c.o FAILED: CMakeFiles/cmTC_f22c6.dir/testCCompiler.c.o /usr/bin/powerpc64-unknown-linux-gnu-gcc -DNDEBUG -O2 -pipe -mcpu=powerpc64 -mtune=powerpc64 -mno-bmi -o CMakeFiles/cmTC_f22c6.dir/testCCompiler.c.o -c testCCompiler.c powerpc64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mno-bmi’; did you mean ‘-Wno-abi’? ninja: build stopped: subcommand failed.
*** This bug has been marked as a duplicate of bug 650506 ***