diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2019-02-22 11:51:05 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2019-02-22 11:51:05 +0100 |
commit | ee332b4a9a19552d160a23155f59b11692d8f07e (patch) | |
tree | 58f40a753ad2430cc8982321e637e153ed80f5f0 /libgomp/configure | |
parent | 1241136c71bc1bf67b1df59f965ad5d50a613b4e (diff) | |
download | gcc-ee332b4a9a19552d160a23155f59b11692d8f07e.zip gcc-ee332b4a9a19552d160a23155f59b11692d8f07e.tar.gz gcc-ee332b4a9a19552d160a23155f59b11692d8f07e.tar.bz2 |
[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
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-x | libgomp/configure | 36 |
1 files changed, 19 insertions, 17 deletions
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 # <http://www.gnu.org/licenses/>. -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 |