aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2019-01-17 12:34:28 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2019-01-17 12:34:28 +0000
commit7431c1a19641953d1d941b346b496c41711c9f0e (patch)
treeebf4c58ef5c9d46348fb5acae6db010302d1c17f /gcc/config.gcc
parent5326695a6d3585f5c49633813909342098d1714c (diff)
downloadgcc-7431c1a19641953d1d941b346b496c41711c9f0e.zip
gcc-7431c1a19641953d1d941b346b496c41711c9f0e.tar.gz
gcc-7431c1a19641953d1d941b346b496c41711c9f0e.tar.bz2
GCN back-end config
This patch contains the configuration adjustments needed to enable the GCN back-end. The new configure check for dlopen is required to allow building the new gcn-run tool. This tool uses libdl to load the HSA runtime libraries, which are required to run programs on the GPU. The tool is disabled if libdl is not available. 2019-01-17 Andrew Stubbs <ams@codesourcery.com> Kwok Cheung Yeung <kcy@codesourcery.com> Julian Brown <julian@codesourcery.com> Tom de Vries <tom@codesourcery.com> Jan Hubicka <hubicka@ucw.cz> Martin Jambor <mjambor@suse.cz> * configure.ac: Likewise. * configure: Regenerate. * contrib/config-list.mk: Add amdgcn-amdhsa. gcc/ * config.gcc: Add amdgcn*-*-amdhsa configuration. * configure.ac: Check for dlopen. * configure: Regenerate. Co-Authored-By: Jan Hubicka <hubicka@ucw.cz> Co-Authored-By: Julian Brown <julian@codesourcery.com> Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com> Co-Authored-By: Martin Jambor <mjambor@suse.cz> Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r268024
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index f7ddb12..a189cb1 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -326,6 +326,10 @@ alpha*-*-*)
cpu_type=alpha
extra_options="${extra_options} g.opt"
;;
+amdgcn*)
+ cpu_type=gcn
+ use_gcc_stdint=wrap
+ ;;
am33_2.0-*-linux*)
cpu_type=mn10300
;;
@@ -1401,6 +1405,25 @@ ft32-*-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
tmake_file="${tmake_file} ft32/t-ft32"
;;
+amdgcn-*-amdhsa)
+ tm_file="elfos.h gcn/gcn-hsa.h gcn/gcn.h newlib-stdint.h"
+ tmake_file="gcn/t-gcn-hsa"
+ native_system_header_dir=/include
+ extra_modes=gcn/gcn-modes.def
+ extra_objs="${extra_objs} gcn-tree.o"
+ extra_gcc_objs="driver-gcn.o"
+ case "$host" in
+ x86_64*-*-linux-gnu )
+ if test "$ac_cv_search_dlopen" != no; then
+ extra_programs="${extra_programs} gcn-run\$(exeext)"
+ fi
+ ;;
+ esac
+ if test x$enable_as_accelerator = xyes; then
+ extra_programs="${extra_programs} mkoffload\$(exeext)"
+ tm_file="${tm_file} gcn/offload.h"
+ fi
+ ;;
moxie-*-elf)
gas=yes
gnu_ld=yes
@@ -4087,6 +4110,24 @@ case "${target}" in
esac
;;
+ amdgcn-*-*)
+ supported_defaults="arch tune"
+
+ for which in arch tune; do
+ eval "val=\$with_$which"
+ case ${val} in
+ "" | carrizo | fiji | gfx900 )
+ # OK
+ ;;
+ *)
+ echo "Unknown cpu used in --with-$which=$val." 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ [ "x$with_arch" = x ] && with_arch=fiji
+ ;;
+
hppa*-*-*)
supported_defaults="arch schedule"