Skip to content

[SystemZ][z/OS] Define _XOPEN_SOURCE=600 for dlopen #127254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions llvm/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,14 @@ if (NOT PURE_WINDOWS)
if( HAVE_LIBDL )
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
endif()
# Add the _XOPEN_SOURCE macro on z/OS, as certain test(s) use dlopen
if (ZOS)
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=600")
endif()
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
if (ZOS)
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=600")
endif()
if( HAVE_LIBDL )
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl)
endif()
Expand Down