aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2019-10-08 12:23:25 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2019-10-08 12:23:25 +0000
commit9dfddd6912d2af7f5a4e27a9b7782214bf2045e9 (patch)
treefb373e6b9870c835defd1d5186e8f202cf8d79a6
parent731769fe89c8e17850bc9df82d2ed248632a59ad (diff)
downloadopenmp-9dfddd6912d2af7f5a4e27a9b7782214bf2045e9.tar.gz
Don't link libm with -Wl,--as-needed on FreeBSD
Patch by jbeich (Jan Beich) Differential Revision: https://reviews.llvm.org/D68051 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@374037 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--runtime/cmake/LibompHandleFlags.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/cmake/LibompHandleFlags.cmake b/runtime/cmake/LibompHandleFlags.cmake
index 4ad8e26..046c5d8 100644
--- a/runtime/cmake/LibompHandleFlags.cmake
+++ b/runtime/cmake/LibompHandleFlags.cmake
@@ -126,11 +126,11 @@ function(libomp_get_libflags libflags)
if(${IA32})
libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY)
endif()
- if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD")
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 "(Free|Net)BSD")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
libomp_append(libflags_local -lm)
endif()
set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})