<div dir="ltr"><div>I'm having trouble building clang+OpenMP on a Power9 system with support of offloading to an attached Nvidia GPU (V100). Is this kind of build currently supported? I was able to successfully build clang, which I'm now attempting to use as the C/C++ compiler for a clang+openMP build. </div><div><br></div><div> Here are my Cmake/make commands:</div><div>----------------------------------------</div><div>/home/username/misc/bin/cmake -G "Unix Makefiles" ../llvm \<br>  -DLLVM_ENABLE_PROJECTS="clang;openmp" \<br>  -DCMAKE_BUILD_TYPE=Release \<br>  -DCMAKE_INSTALL_PREFIX=/home/username/compilers/clang-build-RELEASE_900-rc6_pwr9 \<br>  -DCMAKE_C_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang \<br>  -DCMAKE_C_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0" \<br>  -DCMAKE_CXX_COMPILER=/home/username/git/llvm-project/install_pwr9/bin/clang++ \<br>  -DCMAKE_CXX_FLAGS="--gcc-toolchain=/auto/software/gcc/ppc64le/gcc-8.3.0" \<br>  -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_70 \<br>  -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=70<br></div><div><br></div><div>make VERBOSE=1 -j8</div><div>----------------------------------------<br></div><div><br></div><div>Here's the error I'm getting: </div><div>----------------------------------------<br></div>/usr/local/cuda-10.1/bin/nvcc /home/username/git/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/<a href="http://omp_data.cu">omp_data.cu</a> -dc -o /home/username/git/llvm-project/build_pwr9/projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omp_data.cu.o -ccbin /auto/software/gcc/ppc64le/gcc-8.3.0/bin/gcc -m64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -gencode arch=compute_35,code=sm_35 -DNVCC -I/usr/local/cuda-10.1/include -I/usr/include/libxml2 -I/home/username/git/llvm-project/build_pwr9/include -I/home/username/git/llvm-project/llvm/include -I/home/username/git/llvm-project/openmp/libomptarget/include<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/type_traits(335): error: identifier "__ieee128" is undefined<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(101): error: identifier "__ieee128" is undefined<br>/auto/software/gcc/ppc64le/gcc-8.3.0/include/c++/8.3.0/bits/std_abs.h(102): error: identifier "__ieee128" is undefined<br>3 errors detected in the compilation of "/tmp/tmpxft_0000bd6b_00000000-6_omp_data.cpp1.ii".<br><div>----------------------------------------<br></div><div><br></div><div>Finally, here are the offending lines from std_abs.h:</div><div>----------------------------------------<br></div><div> 99 #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)<br>100   inline _GLIBCXX_CONSTEXPR<br>101   __float128<br>102   abs(__float128 __x)<br>103   { return __x < 0 ? -__x : __x; }<br>104 #endif<br></div><div><br></div><div>I haven't been able to find any reference of a variable substitution/macro between __float128 and __ieee128, I'm not sure where/when this takes place.</div><div>----------------------------------------<br></div><div><br></div><div>Any ideas? I'm not sure if the errors stem from my clang build process, my gcc installation, my cuda/nvcc installlation, Unix Makefiles vs Ninja, etc.</div><div><br></div><div>Jacob</div></div>