diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-05-05 23:01:36 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2022-05-12 15:11:30 +0200 |
commit | dcc266796a6afa18eeba1edde81f9eb78e6c83ce (patch) | |
tree | 93a894b66a4082ec7fb879779c69ad565fa995e5 /libgomp/configure | |
parent | dfda40f8147412328f699628a54b0aaa584776e7 (diff) |
Refactor '-ldl' handling for libgomp proper and plugins
Instead of implicit global 'LIBS="-ldl $LIBS"' via 'AC_CHECK_LIB', make
'-ldl' explicit for libgomp proper, and clean up 'PLUGIN_GCN_LIBS',
'PLUGIN_NVPTX_LIBS' accordingly.
libgomp/
* Makefile.am (libgomp_la_LIBADD): Initialize.
* plugin/configfrag.ac (DL_LIBS): New.
(PLUGIN_GCN_LIBS): Remove.
(PLUGIN_NVPTX_LIBS): Don't set in the 'PLUGIN_NVPTX_DYNAMIC' case.
* plugin/Makefrag.am (libgomp_la_LIBADD)
(libgomp_plugin_gcn_la_LIBADD): Consider '$(DL_LIBS)'.
(libgomp_plugin_nvptx_la_LIBADD) <PLUGIN_NVPTX_DYNAMIC>: Likewise.
* Makefile.in: Regenerate.
* config.h.in: Likewise.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-x | libgomp/configure | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libgomp/configure b/libgomp/configure index 0df47cf96e3..66dface222e 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -675,12 +675,12 @@ offload_additional_lib_paths offload_additional_options offload_targets offload_plugins -PLUGIN_GCN_LIBS PLUGIN_NVPTX_LIBS PLUGIN_NVPTX_LDFLAGS PLUGIN_NVPTX_CPPFLAGS CUDA_DRIVER_LIB CUDA_DRIVER_INCLUDE +DL_LIBS libtool_VERSION ac_ct_FC FCFLAGS @@ -15057,6 +15057,8 @@ _ACEOF # <http://www.gnu.org/licenses/>. plugin_support=yes +DL_LIBS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 $as_echo_n "checking for dlsym in -ldl... " >&6; } if ${ac_cv_lib_dl_dlsym+:} false; then : @@ -15094,12 +15096,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 $as_echo "$ac_cv_lib_dl_dlsym" >&6; } if test "x$ac_cv_lib_dl_dlsym" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF - - LIBS="-ldl $LIBS" - + DL_LIBS=-ldl else plugin_support=no fi @@ -15221,8 +15218,6 @@ PLUGIN_NVPTX_DYNAMIC=0 PLUGIN_GCN=0 -PLUGIN_GCN_LIBS= - # Parse '--enable-offload-targets', figure out the corresponding libgomp # plugins, and configure to find the corresponding offload compilers. @@ -15295,7 +15290,6 @@ rm -f core conftest.err conftest.$ac_objext \ && (test "x$CUDA_DRIVER_LIB" = x \ || test "x$CUDA_DRIVER_LIB" = xno); then PLUGIN_NVPTX=1 - PLUGIN_NVPTX_LIBS='-ldl' PLUGIN_NVPTX_DYNAMIC=1 else PLUGIN_NVPTX=0 @@ -15321,8 +15315,6 @@ rm -f core conftest.err conftest.$ac_objext \ ;; *) tgt_plugin=gcn - PLUGIN_GCN=$tgt - PLUGIN_GCN_LIBS="-ldl" PLUGIN_GCN=1 ;; esac |