aboutsummaryrefslogtreecommitdiff
path: root/libgomp/configure
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2019-11-13 12:38:18 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2019-11-13 12:38:18 +0000
commit237957cc2c1818f30207f02747a880bd1cd28d0b (patch)
tree5e61460a8322b39562ed270b776a8cdafb660dcb /libgomp/configure
parentfe22e0d4f1d705fef8ad037bcc8c6092c139b298 (diff)
downloadgcc-237957cc2c1818f30207f02747a880bd1cd28d0b.zip
gcc-237957cc2c1818f30207f02747a880bd1cd28d0b.tar.gz
gcc-237957cc2c1818f30207f02747a880bd1cd28d0b.tar.bz2
GCN Libgomp Plugin
2019-11-13 Andrew Stubbs <ams@codesourcery.com> Kwok Cheung Yeung <kcy@codesourcery.com> Julian Brown <julian@codesourcery.com> Tom de Vries <tom@codesourcery.com> libgomp/ * plugin/Makefrag.am: Add amdgcn plugin support. * plugin/configfrag.ac: Likewise. * plugin/plugin-gcn.c: New file. * configure: Regenerate. * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Co-Authored-By: Julian Brown <julian@codesourcery.com> Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com> Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r278138
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-xlibgomp/configure59
1 files changed, 57 insertions, 2 deletions
diff --git a/libgomp/configure b/libgomp/configure
index 6a9ccc1..04a6fd9 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -662,6 +662,8 @@ LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE
LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE
OPT_LDFLAGS
SECTION_LDFLAGS
+PLUGIN_GCN_FALSE
+PLUGIN_GCN_TRUE
PLUGIN_HSA_FALSE
PLUGIN_HSA_TRUE
PLUGIN_NVPTX_FALSE
@@ -670,6 +672,10 @@ offload_additional_lib_paths
offload_additional_options
offload_targets
offload_plugins
+PLUGIN_GCN_LIBS
+PLUGIN_GCN_LDFLAGS
+PLUGIN_GCN_CPPFLAGS
+PLUGIN_GCN
PLUGIN_HSA_LIBS
PLUGIN_HSA_LDFLAGS
PLUGIN_HSA_CPPFLAGS
@@ -11399,7 +11405,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11402 "configure"
+#line 11408 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11505,7 +11511,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11508 "configure"
+#line 11514 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15229,6 +15235,15 @@ PLUGIN_HSA_LIBS=
+PLUGIN_GCN=0
+PLUGIN_GCN_CPPFLAGS=
+PLUGIN_GCN_LDFLAGS=
+PLUGIN_GCN_LIBS=
+
+
+
+
+
# Parse '--enable-offload-targets', figure out the corresponding libgomp
# plugins, and configure to find the corresponding offload compilers.
# 'offload_plugins' and 'offload_targets' will be populated in the same order.
@@ -15340,6 +15355,29 @@ rm -f core conftest.err conftest.$ac_objext \
;;
esac
;;
+
+ amdgcn*)
+ case "${target}" in
+ x86_64-*-*)
+ case " ${CC} ${CFLAGS} " in
+ *" -m32 "*)
+ PLUGIN_GCN=0
+ ;;
+ *)
+ tgt_plugin=gcn
+ PLUGIN_GCN=$tgt
+ PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
+ PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
+ PLUGIN_GCN_LIBS="-ldl"
+ PLUGIN_GCN=1
+ ;;
+ esac
+ ;;
+ *-*-*)
+ PLUGIN_GCN=0
+ ;;
+ esac
+ ;;
*)
as_fn_error $? "unknown offload target specified" "$LINENO" 5
;;
@@ -15404,6 +15442,19 @@ cat >>confdefs.h <<_ACEOF
#define PLUGIN_HSA $PLUGIN_HSA
_ACEOF
+ if test $PLUGIN_GCN = 1; then
+ PLUGIN_GCN_TRUE=
+ PLUGIN_GCN_FALSE='#'
+else
+ PLUGIN_GCN_TRUE='#'
+ PLUGIN_GCN_FALSE=
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define PLUGIN_GCN $PLUGIN_GCN
+_ACEOF
+
if test "$HSA_RUNTIME_LIB" != ""; then
HSA_RUNTIME_LIB="$HSA_RUNTIME_LIB/"
@@ -17122,6 +17173,10 @@ if test -z "${PLUGIN_HSA_TRUE}" && test -z "${PLUGIN_HSA_FALSE}"; then
as_fn_error $? "conditional \"PLUGIN_HSA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${PLUGIN_GCN_TRUE}" && test -z "${PLUGIN_GCN_FALSE}"; then
+ as_fn_error $? "conditional \"PLUGIN_GCN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE}"; then
as_fn_error $? "conditional \"LIBGOMP_BUILD_VERSIONED_SHLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5