Hi!
On 2025-11-28T14:04:59+0100, Tobias Burnus <[email protected]> wrote:
> GCN: Use generic instead of specific arch for default-built multilibs
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -4084,16 +4084,17 @@ supported ISAs as multilib; use
> @code{--with-multilib-list=} to tailor the built
> multilibs. Note that mixing ISAs in the same binary is not supported and
> gives
> a linker error.
>
> -By default, multilib support is built for @code{gfx900}, @code{gfx906},
> -@code{gfx908}, @code{gfx90a}, @code{gfx90c}, @code{gfx1030}, @code{gfx1036},
> -@code{gfx1100} and @code{gfx1103}. The default multilib configuration
> -requires LLVM 15 or newer. LLVM 13.0.1 or LLVM 14 can be used by specifying
> -a @code{--with-multilib-list=} that does not list any GFX 11 device nor
> -@code{gfx1036}. At least LLVM 16 is required for @code{gfx1150} and
> -@code{gfx1151}, LLVM 18 for @code{gfx942}, LLVM 19 for the generic
> +By default, multilib support is built for @code{gfx908}, @code{gfx90a},
> @code{gfx9-generic}, @code{gfx9-4-generic}, @code{gfx10-3-generic}, and
> -@code{gfx11-generic} targets and for @code{gfx1152}, while LLVM 20 is
> required
> -for @code{gfx950} and @code{gfx1153}.
> +@code{gfx11-generic}, which covers all supported archs. The default multilib
> +configuration requires LLVM 19 or newer. LLVM 13.0.1 or LLVM 14 can be used
> by
> +specifying a @code{--with-multilib-list=} that only lists GFX9 or GFX10-3
> +devices, while LLVM 15 is required for GFX 11 device and @code{gfx1036}.
> +At least LLVM 16 is required for @code{gfx1150} and @code{gfx1151},
> +LLVM 18 for @code{gfx942}, LLVM 19 for the generic @code{gfx9-generic},
> +@code{gfx9-4-generic}, @code{gfx10-3-generic}, and @code{gfx11-generic}
> +targets and for @code{gfx1152}, while LLVM 20 is required for
> +@code{gfx950} and @code{gfx1153}.
> gcc-16/changes.html: Update AMD GPU (gcn) for updated multilib support
> --- a/htdocs/gcc-16/changes.html
> +++ b/htdocs/gcc-16/changes.html
> @@ -229,9 +229,25 @@ for general information.</p>
> <ul>
> <li>Experimental support for AMD Instinct MI300 (<code>gfx942</code>)
> devices
> has been added, including the generic <code>gfx9-4-generic</code> and
> - mostly compatible <code>gfx950</code>. Consult GCC's
> - <a href="https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa">
> - installation notes</a> on how to enable multilib support for them.</li>
> + mostly compatible <code>gfx950</code>.</li>
> + <li>By default, the following multilibs are now built: <code>gfx908</code>,
> + <code>gfx90a</code>, <code>gfx9-generic</code>,
> + <code>gfx9-4-generic</code>, <code>gfx10-3-generic</code>, and
> + <code>gfx11-generic</code>. Multilibs for specific devices are no
> longer
> + built by default if a generic arch exists. Note:
> + <ul>
> + <li>When compiling for a specific arch and the multilib only exists
> + for the associated generic arch, GCC's error message suggests
> + the command-line option to do so.</li>
> + <li>Generic architectures require ROCm 6.4.0 or newer.</li>
> + <li>The new default-built set of multilibs now requires the assembler
> + and linker of LLVM 19 or newer.</li>
> + <li>Consult GCC'sm
> + <a
> href="https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa">
> + AMD installation notes</a> and
> + <a
> href="https://gcc.gnu.org/install/configure.html#:~:text=%2D%2Dwith%2Dmultilib%2Dlist">
> + configuration notes</a> for setting the multilibs to be
> build.</li>
> + </ul></li>
I found that LLVM 19.1.7 (via Guix) doesn't support 'gfx9-4-generic':
[...]
checking for suffix of object files... configure: error: in
`[...]/build-gcc-offload-amdgcn-amdhsa/amdgcn-amdhsa/gfx9-4-generic/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[1]: *** [Makefile:14238: configure-target-libgcc] Error 1
[...]
'gfx9-4-generic' is not a recognized processor for this target (ignoring
processor)
'gfx9-4-generic' is not a recognized processor for this target (ignoring
processor)
/tmp/cc5g6mSR.s:1:17: error: .amdgcn_target directive's target id
amdgcn-unknown-amdhsa--gfx9-4-generic does not match the specified target id
amdgcn-unknown-amdhsa--gfx000
.amdgcn_target "amdgcn-unknown-amdhsa--gfx9-4-generic"
^
[...]
Switching to LLVM 20.1.8 (via Guix), it builds.
Do we update the LLVM requirement, or change the (default) configuration?
Grüße
Thomas