Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 9dfddd6

Browse files
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
1 parent 731769f commit 9dfddd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/cmake/LibompHandleFlags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ function(libomp_get_libflags libflags)
126126
if(${IA32})
127127
libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY)
128128
endif()
129-
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
129+
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD")
130130
libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
131131
libomp_append(libflags_local "-lm")
132132
libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
133-
elseif(${CMAKE_SYSTEM_NAME} MATCHES "(Free|Net)BSD")
133+
elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
134134
libomp_append(libflags_local -lm)
135135
endif()
136136
set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})

0 commit comments

Comments
 (0)