mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
configure: check for dlsym instead of dlopen.
When building with sanitizers the sanitizer library provides dlopen, but not
dlsym(), making configure think that -ldl isn't needed. Just checking for
dlsym() ought to suffice, hard to see dlsym() being provided without dlopen()
also being provided.
Backpatch to all branches, for the same reasons as 46ab07ffda
.
Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20220323173537.ll7klrglnp4gn2um@alap3.anarazel.de
Backpatch: 10-
This commit is contained in:
@ -1091,7 +1091,10 @@ AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_SEARCH_LIBS(setproctitle, util)
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
# gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
|
||||
# when enabling asan the dlopen check doesn't notice that -ldl is actually
|
||||
# required. Just checking for dlsym() ought to suffice.
|
||||
AC_SEARCH_LIBS(dlsym, dl)
|
||||
AC_SEARCH_LIBS(socket, [socket ws2_32])
|
||||
AC_SEARCH_LIBS(shl_load, dld)
|
||||
# We only use libld in port/dynloader/aix.c
|
||||
|
Reference in New Issue
Block a user