diff --git a/openmp/libomptarget/deviceRTLs/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/CMakeLists.txt --- a/openmp/libomptarget/deviceRTLs/CMakeLists.txt +++ b/openmp/libomptarget/deviceRTLs/CMakeLists.txt @@ -10,4 +10,5 @@ # ##===----------------------------------------------------------------------===## +add_subdirectory(amdgcn) add_subdirectory(nvptx) diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt --- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt +++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt @@ -154,6 +154,6 @@ add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) install(FILES ${OUTPUTDIR}/${bc_libname} - DESTINATION "${OPENMP_INSTALL_LIBDIR}/libdevice" + DESTINATION "${OPENMP_INSTALL_LIBDIR}" ) endforeach() diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h b/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h --- a/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h +++ b/openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h @@ -67,6 +67,10 @@ __kmpc_impl_all_lanes = ~(__kmpc_impl_lanemask_t)0 }; -EXTERN int printf(const char *, ...); +// The return code of printf is not checked in the call sites in this library. +// A call to a function named printf currently hits some special case handling +// for opencl, which translates to calls that do not presently exist for openmp +// Therefore, for now, stub out printf while building this library. +#define printf(...) #endif