From ee332b4a9a19552d160a23155f59b11692d8f07e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 22 Feb 2019 11:51:05 +0100 Subject: [libgomp] Clarify difference between offload target, offload plugin, and OpenACC device type libgomp/ * plugin/configfrag.ac: Populate and AC_SUBST offload_plugins instead of offload_targets, and AC_DEFINE_UNQUOTED OFFLOAD_PLUGINS instead of OFFLOAD_TARGETS. * target.c (gomp_target_init): Adjust. * testsuite/libgomp-test-support.exp.in: Likewise. * testsuite/lib/libgomp.exp: Likewise. Populate openacc_device_types_s instead of offload_targets_s_openacc. (check_effective_target_openacc_nvidia_accel_selected) (check_effective_target_openacc_host_selected): Adjust. * testsuite/libgomp.oacc-c++/c++.exp: Likewise. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r269107 --- libgomp/configure | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'libgomp/configure') diff --git a/libgomp/configure b/libgomp/configure index 013e37c..1033ae4 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -667,6 +667,7 @@ PLUGIN_NVPTX_FALSE PLUGIN_NVPTX_TRUE offload_additional_lib_paths offload_additional_options +offload_plugins PLUGIN_HSA_LIBS PLUGIN_HSA_LDFLAGS PLUGIN_HSA_CPPFLAGS @@ -679,7 +680,6 @@ PLUGIN_NVPTX_CPPFLAGS PLUGIN_NVPTX CUDA_DRIVER_LIB CUDA_DRIVER_INCLUDE -offload_targets libtool_VERSION ac_ct_FC FCFLAGS @@ -15401,8 +15401,6 @@ fi # see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # . -offload_targets= - plugin_support=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 $as_echo_n "checking for dlsym in -ldl... " >&6; } @@ -15621,7 +15619,10 @@ PLUGIN_HSA_LIBS= -# Get offload targets and path to install tree of offloading compiler. +# Parse '--enable-offload-targets', figure out the corresponding libgomp +# plugins, and configure to find the corresponding offload compilers. +offload_plugins= + offload_additional_options= offload_additional_lib_paths= @@ -15630,13 +15631,13 @@ if test x"$enable_offload_targets" != x; then for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'` tgt=`echo $tgt | sed 's/=.*//'` - tgt_name= + tgt_plugin= case $tgt in *-intelmic-* | *-intelmicemul-*) - tgt_name=intelmic + tgt_plugin=intelmic ;; nvptx*) - tgt_name=nvptx + tgt_plugin=nvptx PLUGIN_NVPTX=$tgt if test "x$CUDA_DRIVER_LIB" != xno \ && test "x$CUDA_DRIVER_LIB" != xno; then @@ -15695,7 +15696,7 @@ rm -f core conftest.err conftest.$ac_objext \ PLUGIN_HSA=0 ;; *) - tgt_name=hsa + tgt_plugin=hsa PLUGIN_HSA=$tgt PLUGIN_HSA_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS PLUGIN_HSA_LDFLAGS="$HSA_RUNTIME_LDFLAGS" @@ -15713,7 +15714,7 @@ rm -f core conftest.err conftest.$ac_objext \ LDFLAGS=$PLUGIN_HSA_save_LDFLAGS LIBS=$PLUGIN_HSA_save_LIBS case $PLUGIN_HSA in - hsa*) + hsa*) HSA_PLUGIN=0 as_fn_error $? "HSA run-time package required for HSA support" "$LINENO" 5 ;; @@ -15730,16 +15731,17 @@ rm -f core conftest.err conftest.$ac_objext \ as_fn_error $? "unknown offload target specified" "$LINENO" 5 ;; esac - if test x"$tgt_name" = x; then - # Don't configure libgomp for this offloading target if we don't build - # the corresponding plugin. + if test x"$tgt_plugin" = x; then + # Not configuring libgomp for this offload target if we're not building + # the corresponding offload plugin. continue - elif test x"$offload_targets" = x; then - offload_targets=$tgt_name + elif test x"$offload_plugins" = x; then + offload_plugins=$tgt_plugin else - offload_targets=$offload_targets,$tgt_name + offload_plugins=$offload_plugins,$tgt_plugin fi - if test "$tgt_name" = hsa; then + # Configure additional search paths. + if test "$tgt_plugin" = hsa; then # Offloading compilation is all handled by the target compiler. : elif test x"$tgt_dir" != x; then @@ -15753,7 +15755,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi cat >>confdefs.h <<_ACEOF -#define OFFLOAD_TARGETS "$offload_targets" +#define OFFLOAD_PLUGINS "$offload_plugins" _ACEOF if test $PLUGIN_NVPTX = 1; then -- cgit v1.1