aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2022-05-17 15:48:40 +0200
committerTobias Burnus <tobias@codesourcery.com>2022-05-17 15:54:23 +0200
commitebe5dace8c318b38f42cfe1d148e90dcdfadb31e (patch)
tree413505e4392c9a976cd3ae4399a63a685ff819c0
parent2c16eb3157f86ae561468c540caf8eb326106b5f (diff)
downloadgcc-ebe5dace8c318b38f42cfe1d148e90dcdfadb31e.zip
gcc-ebe5dace8c318b38f42cfe1d148e90dcdfadb31e.tar.gz
gcc-ebe5dace8c318b38f42cfe1d148e90dcdfadb31e.tar.bz2
gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]
Improve cross-compiler handling. gcc/ChangeLog: PR target/105602 * config/gcn/t-omp-device (arch): Add 'amdgcn' besides existing 'gcn'. * config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Likewise.
-rw-r--r--gcc/config/gcn/gcn.cc2
-rw-r--r--gcc/config/gcn/t-omp-device2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index e2e9335..76b27c4 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -2632,7 +2632,7 @@ gcn_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait,
case omp_device_kind:
return strcmp (name, "gpu") == 0;
case omp_device_arch:
- return strcmp (name, "gcn") == 0;
+ return strcmp (name, "amdgcn") == 0 || strcmp (name, "gcn") == 0;
case omp_device_isa:
if (strcmp (name, "fiji") == 0)
return gcn_arch == PROCESSOR_FIJI;
diff --git a/gcc/config/gcn/t-omp-device b/gcc/config/gcn/t-omp-device
index cd56e2f..e1d9e0d 100644
--- a/gcc/config/gcn/t-omp-device
+++ b/gcc/config/gcn/t-omp-device
@@ -1,4 +1,4 @@
omp-device-properties-gcn: $(srcdir)/config/gcn/gcn.cc
echo kind: gpu > $@
- echo arch: gcn >> $@
+ echo arch: amdgcn gcn >> $@
echo isa: fiji gfx900 gfx906 gfx908 >> $@