cmake: check we're not linking against a static c runtime without dlopen support#15531
cmake: check we're not linking against a static c runtime without dlopen support#15531madebr wants to merge 12 commits intolibsdl-org:mainfrom
Conversation
|
This seems fine to me, but I think the issue with musl is that dlopen exists, it’s just a stub that returns a failure. |
|
In this particular case, the OS runtime has decided that dynamic linking is not available, and we don’t know that in advance. The user needs to be aware of this and configure SDL not to do dynamic loading. |
|
True, the test correctly fails when using the bfd and gold linker, |
|
I will squash the extra commits to one after review. I hacked on the CMake build script until |
| set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"") | ||
| set(HAVE_LIBUDEV TRUE) | ||
| if(NOT HAVE_SDL_LOADSO) | ||
| message(WARNING "You must have SDL_LoadObject() support for libudev support") |
There was a problem hiding this comment.
I believe we can link with -ludev normally and not dynamically load it. If that's not true, the we should probably fix it.
There was a problem hiding this comment.
I added this support. I'm going to create a separate pr for this.
|
|
||
| if(SDL_LIBURING) | ||
| set(HAVE_LIBURING_H FALSE) | ||
| if(SDL_LIBURING AND HAVE_SDL_LOADSO) |
There was a problem hiding this comment.
Same: I will create a separate pr for this.
Description
Existing Issue(s)
Fixes #15525