Hi, I tried to build the latest version of llvm-trunk with Cmake (gcc-6.4.0 is necessary for CUDA-9.0) on my "SUSE Linux Enterprise Server 12.2 (x86_64)". Unfortunately I got an error with the following configuration, because "pthread_atfork" wasn't defined. set LLVM_VERSION=llvm-trunk cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/${LLVM_VERSION} \ -GNinja \ -DLLVM_TARGETS_TO_BUILD:STRING="NVPTX;X86" \ -DCMAKE_BUILD_TYPE:STRING="Release" \ -DLLVM_PARALLEL_COMPILE_JOBS:STRING="4" \ -DLLVM_PARALLEL_LINK_JOBS:STRING="4" \ -DCMAKE_C_COMPILER:STRING="/usr/local/gcc-6.4.0/bin/gcc" \ -DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include -I/usr/include/ncurses" \ -DCMAKE_CXX_COMPILER:STRING="/usr/local/gcc-6.4.0/bin/g++" \ -DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include -I/usr/include/ncurses" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="-m64" \ -DLLVM_LIBDIR_SUFFIX:STRING="64" \ -DLLVM_POLLY_LINK_INTO_TOOLS:BOOL=ON \ -DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include" \ -DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/libelf.so" \ -DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:STRING="/usr/include" \ -DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES:STRING="/usr/lib64/libffi.so" \ -DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \ -DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/libcudart.so" \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DOPENMP_ENABLE_LIBOMPTARGET:BOOL=On \ ../llvm \ |& tee log.cmake ninja |& tee log.ninja-build I was able to build the project after adding the following lines to the configuration command. -DCMAKE_C_STANDARD_LIBRARIES="-lpthread" \ -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ Can somebody add the library to the default configuration files? Thank you very much for any help in advance. Kind regards Siegmar