[Openmp-commits] [PATCH] D119827: [OpenMP][cmake] Ensure linking against libm for Linux
James Beddek via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Feb 15 03:33:24 PST 2022
telans created this revision.
Herald added subscribers: guansong, krytarowski, yaxunl, mgorny.
telans requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
Do the same is as done for NetBSD. Compiling libomp with Clang uses fmaxl.
Downstream report: https://bugs.gentoo.org/816831
Fixes: https://github.com/llvm/llvm-project/issues/51457
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119827
Files:
openmp/runtime/cmake/LibompHandleFlags.cmake
Index: openmp/runtime/cmake/LibompHandleFlags.cmake
===================================================================
--- openmp/runtime/cmake/LibompHandleFlags.cmake
+++ openmp/runtime/cmake/LibompHandleFlags.cmake
@@ -139,7 +139,7 @@
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)
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|NetBSD")
libomp_append(libflags_local -lm)
endif()
set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119827.408801.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220215/fce14643/attachment.bin>
More information about the Openmp-commits
mailing list