Skip to content

Commit 5feebdc

Browse files
authored
[OpenMP] Link against libm on OpenBSD (#70614)
Needed for some math functions in libomp.
1 parent acef83c commit 5feebdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/cmake/LibompHandleFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function(libomp_get_libflags libflags)
140140
if(LIBOMP_HAVE_SHM_OPEN_WITH_LRT)
141141
libomp_append(libflags_local -lrt)
142142
endif()
143-
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD")
143+
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|OpenBSD")
144144
libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
145145
libomp_append(libflags_local "-lm")
146146
libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)

0 commit comments

Comments
 (0)