[Openmp-commits] [openmp] [OpenMP] Link against libm on OpenBSD (PR #70614)

Brad Smith via Openmp-commits openmp-commits at lists.llvm.org
Sun Oct 29 19:33:20 PDT 2023


https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/70614

None

>From e0a4b00be528014dcf7e96d2d4df4a37d734c353 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Sun, 29 Oct 2023 22:17:48 -0400
Subject: [PATCH] [OpenMP] Link against libm on OpenBSD

---
 openmp/runtime/cmake/LibompHandleFlags.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
index bb53445be9a3bbb..2186b9fa297d92a 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