mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 18:16:04 +00:00
Don't link libm with -Wl,--as-needed on FreeBSD
Patch by jbeich (Jan Beich) Differential Revision: https://reviews.llvm.org/D68051 llvm-svn: 374037
This commit is contained in:
parent
537225a6a3
commit
f34271d886
@ -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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user