]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]
authorTobias Burnus <tobias@codesourcery.com>
Tue, 17 May 2022 13:48:40 +0000 (15:48 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 17 May 2022 13:54:23 +0000 (15:54 +0200)
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.

gcc/config/gcn/gcn.cc
gcc/config/gcn/t-omp-device

index e2e9335ad753005d20e874c5d0f678743babaff3..76b27c49d76ba07d94ec3914cadd866b386ea518 100644 (file)
@@ -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;
index cd56e2f8a68cea1c1f6b04830cfa37f04305961f..e1d9e0d2a1e8d0b1bd311cf72092027d47732c52 100644 (file)
@@ -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 >> $@