]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcn: Update --with-arch= for newer archs
authorTobias Burnus <tburnus@baylibre.com>
Thu, 5 Jun 2025 08:36:21 +0000 (10:36 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 5 Jun 2025 08:36:21 +0000 (10:36 +0200)
Replace hard-coded list of supported devices by directly checking
config/gcn/gcn-devices.def.

gcc/ChangeLog:

* config.gcc (--with-{arch,tune}): Use .def file to validate gcn
processor names.
* doc/install.texi (amdgcn*-*-*): Update list of devices supported
by --with-arch/--with-tune.

gcc/config.gcc
gcc/doc/install.texi

index 1e386a469e0e8a0bd73a4834ad5ac79ef4972419..8365b9170687440a92dcde89b009bc4733164040 100644 (file)
@@ -4611,15 +4611,13 @@ case "${target}" in
 
                for which in arch tune; do
                        eval "val=\$with_$which"
-                       case ${val} in
-                       "" | gfx900 | gfx906 | gfx908 | gfx90a | gfx90c | gfx1030 | gfx1036 | gfx1100 | gfx1103)
-                               # OK
-                               ;;
-                       *)
+                       if test x"$val" != x \
+                          && ! grep -q "GCN_DEVICE($val," \
+                                       "${srcdir}/config/gcn/gcn-devices.def";
+                       then
                                echo "Unknown cpu used in --with-$which=$val." 1>&2
                                exit 1
-                               ;;
-                       esac
+                       fi
                done
                [ "x$with_arch" = x ] && with_arch=gfx900
 
index ff083360be213c26ea6100b469e08260f4834309..fb921b326f174eeefbf3b4284370b2c1a64404ca 100644 (file)
@@ -1342,9 +1342,13 @@ default set of libraries is selected based on the value of
 
 @item amdgcn*-*-*
 @var{list} is a comma separated list of ISA names (allowed values:
-@code{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}, @code{gfx90c}, 
-@code{gfx1030}, @code{gfx1036}, @code{gfx1100}, @code{gfx1103}).
-It ought not include the name of the default
+@code{gfx900}, @code{gfx902}, @code{gfx904}, @code{gfx906}, @code{gfx908},
+@code{gfx909}, @code{gfx90a}, @code{gfx90c}, @code{gfx9-generic},
+@code{gfx1030}, @code{gfx1031}, @code{gfx1032}, @code{gfx1033},
+@code{gfx1034}, @code{gfx1035}, @code{gfx1036}, @code{gfx10-3-generic},
+@code{gfx1100}, @code{gfx1101}, @code{gfx1102}, @code{gfx1103},
+@code{gfx1150}, @code{gfx1151}, @code{gfx1152}, @code{gfx1153},
+@code{gfx11-generic}).  It ought not include the name of the default
 ISA, specified via @option{--with-arch}.  If @var{list} is empty, then there
 will be no multilibs and only the default run-time library will be built.  If
 @var{list} is @code{default} or @option{--with-multilib-list=} is not