Overview

Request 760739 accepted

- Enable support for riscv64
- clang-riscv64-rv64gc.diff, riscv64-suse-linux.patch,
llvm-riscv64-fix-cffi.diff, D60657-riscv-pcrel_lo.diff: Backports from
master

Loading...

Aaron Puchert's avatar

Are you sure that this works? In a project using Clang as compiler CMake configuration fails with

[  297s] -- Check for working C compiler: /usr/bin/clang
[  300s] -- Check for working C compiler: /usr/bin/clang -- broken
[  300s] CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
[  300s]   The C compiler
[  300s] 
[  300s]     "/usr/bin/clang"
[  300s] 
[  300s]   is not able to compile a simple test program.
[  300s] 
[  300s]   It fails with the following output:
[  300s] 
[  300s]     Change Dir: /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp
[  300s]     
[  300s]     Run Build Command(s):/usr/bin/gmake cmTC_afa4f/fast && /usr/bin/gmake -f CMakeFiles/cmTC_afa4f.dir/build.make CMakeFiles/cmTC_afa4f.dir/build
[  300s]     gmake[1]: Entering directory '/home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp'
[  300s]     Building C object CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.o
[  300s]     /usr/bin/clang   -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=thin -g -DNDEBUG    -o CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.o   -c /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp/testCCompiler.c
[  300s]     Stack dump:
[  300s]     0. Program arguments: /usr/bin/clang-9.0.1 -cc1 -triple riscv64-suse-linux-gnu -emit-llvm-bc -flto=thin -flto-unit -disable-free -disable-llvm-verifier -discard-value-names -main-file-name testCCompiler.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-feature +m -target-feature +a -target-feature +f -target-feature +d -target-feature +c -target-feature +relax -target-abi lp64d -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.gcno -resource-dir /usr/lib64/clang/9.0.1 -D _FORTIFY_SOURCE=2 -D NDEBUG -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Werror=return-type -fdebug-compilation-dir /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -dwarf-debug-flags /usr/bin/clang-9.0.1 -fmessage-length=0 -grecord-command-line -O2 -Wall -D _FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=thin -g -D NDEBUG -o CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.o -c /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp/testCCompiler.c -faddrsig -o CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.o -x c /home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp/testCCompiler.c 
[  300s]     #0 0x0000004003251e2a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib64/libLLVM.so.9+0xa94e2a)
[  300s]     #1 0x000000400325053e llvm::sys::RunSignalHandlers() (/usr/bin/../lib64/libLLVM.so.9+0xa9353e)
[  300s]     #2 0x00000040032521ba (/usr/bin/../lib64/libLLVM.so.9+0xa951ba)
[  300s]     #3 0x00000000003138a0 
[  300s]     #4 0x0000004004b9e18e llvm::X86_MC::createX86MCSubtargetInfo(llvm::Triple const&, llvm::StringRef, llvm::StringRef) (/usr/bin/../lib64/libLLVM.so.9+0x23e118e)
[  300s]     #5 0x0000004004b9f0e0 (/usr/bin/../lib64/libLLVM.so.9+0x23e20e0)
[  300s]     clang-9.0: error: unable to execute command: Segmentation fault
[  300s]     clang-9.0: error: clang frontend command failed due to signal (use -v to see invocation)
[  300s]     clang version 9.0.1 
[  300s]     Target: riscv64-suse-linux-gnu
[  300s]     Thread model: posix
[  300s]     InstalledDir: /usr/bin
[  300s]     clang-9.0: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
[  300s]     clang-9.0: error: unable to execute command: Segmentation fault
[  300s]     clang-9.0: note: diagnostic msg: Error generating preprocessed source(s).
[  300s]     gmake[1]: *** [CMakeFiles/cmTC_afa4f.dir/build.make:66: CMakeFiles/cmTC_afa4f.dir/testCCompiler.c.o] Error 254
[  300s]     gmake[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/include-what-you-use/build/CMakeFiles/CMakeTmp'
[  300s]     gmake: *** [Makefile:121: cmTC_afa4f/fast] Error 2

Andreas Schwab's avatar
author source maintainer target maintainer

There appears to be a linker bug that affects users of std::call_once in big executables


Aaron Puchert's avatar

Basically Ok, just a few requests:

  • D60657-riscv-pcrel_lo.diff: Can you add the test case from the commit as well? We run the tests and this would allow us to catch issues.
  • clang-riscv64-rv64gc.diff, riscv64-suse-linux.patch: Can you use the same format as for the other patches, i.e. include the git header?
  • The memory constraints seem rather high, do we need that? I'm somewhat worried that this reduces the number of machines we can build on. Note that we scale the number of compile jobs according to the available memory, so the constraints should be determined by the memory usage of the biggest link jobs (libLLVM.so, libclang.so).

Andreas Schwab's avatar
author source maintainer target maintainer

The testcase doesn't pass, it depends on other changes The resources are needed.


Aaron Puchert's avatar

So you're saying that the memory is needed by the link jobs? Otherwise you should rather adapt mem_per_compile_job.


Andreas Schwab's avatar
author source maintainer target maintainer

No it isn't.

Request History
Andreas Schwab's avatar

Andreas_Schwab created request

- Enable support for riscv64
- clang-riscv64-rv64gc.diff, riscv64-suse-linux.patch,
llvm-riscv64-fix-cffi.diff, D60657-riscv-pcrel_lo.diff: Backports from
master


Martin Pluskal's avatar

pluskalm accepted request

ok

openSUSE Build Service is sponsored by