[Openmp-commits] [openmp] 5feebdc - [OpenMP] Link against libm on OpenBSD (#70614)
via Openmp-commits
openmp-commits at lists.llvm.org
Sat Nov 11 17:37:54 PST 2023
Author: Brad Smith
Date: 2023-11-11T20:37:50-05:00
New Revision: 5feebdcef219b38d2b7e7578e6a9f2f2d37d13d1
URL: https://github.com/llvm/llvm-project/commit/5feebdcef219b38d2b7e7578e6a9f2f2d37d13d1
DIFF: https://github.com/llvm/llvm-project/commit/5feebdcef219b38d2b7e7578e6a9f2f2d37d13d1.diff
LOG: [OpenMP] Link against libm on OpenBSD (#70614)
Needed for some math functions in libomp.
Added:
Modified:
openmp/runtime/cmake/LibompHandleFlags.cmake
Removed:
################################################################################
diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
index ece3db18b1c1ca4..e5c7a3ec6aaa905 100644
--- a/openmp/runtime/cmake/LibompHandleFlags.cmake
+++ b/openmp/runtime/cmake/LibompHandleFlags.cmake
@@ -140,7 +140,7 @@ function(libomp_get_libflags libflags)
if(LIBOMP_HAVE_SHM_OPEN_WITH_LRT)
libomp_append(libflags_local -lrt)
endif()
- if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|OpenBSD")
libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
libomp_append(libflags_local "-lm")
libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
More information about the Openmp-commits
mailing list