[PATCH/committed] sim: support dlopen in -lc

Message ID 20231207035650.30729-1-vapier@gentoo.org
State New
Headers
Series [PATCH/committed] sim: support dlopen in -lc |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Mike Frysinger Dec. 7, 2023, 3:56 a.m. UTC
  Stop assuming that dlopen is only available via -ldl.  Newer versions
of glibc have merged it into -lc which broke this configure test.
---
 sim/configure             | 2 +-
 sim/m4/sim_ac_platform.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 7331ef3a38c5..f45321763fa7 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -151,7 +151,7 @@  AC_SEARCH_LIBS([fabs], [m])
 AC_SEARCH_LIBS([log2], [m])
 
 AC_SEARCH_LIBS([dlopen], [dl])
-if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
+if test "${ac_cv_search_dlopen}" = "none required" || test "${ac_cv_lib_dl_dlopen}" = "yes"; then
   PKG_CHECK_MODULES(SDL, sdl2, [dnl
     SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
   ], [