[Openmp-commits] [openmp] r374037 - Don't link libm with -Wl, --as-needed on FreeBSD

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 8 05:23:25 PDT 2019


Author: achurbanov
Date: Tue Oct  8 05:23:25 2019
New Revision: 374037

URL: http://llvm.org/viewvc/llvm-project?rev=374037&view=rev
Log:
Don't link libm with -Wl,--as-needed on FreeBSD

Patch by jbeich (Jan Beich)

Differential Revision: https://reviews.llvm.org/D68051

Modified:
    openmp/trunk/runtime/cmake/LibompHandleFlags.cmake

Modified: openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompHandleFlags.cmake?rev=374037&r1=374036&r2=374037&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompHandleFlags.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompHandleFlags.cmake Tue Oct  8 05:23:25 2019
@@ -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})




More information about the Openmp-commits mailing list