https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122612
Bug ID: 122612
Summary: nvptx defaults to arch no longer supported by CUDA 13
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
CC: burnus at gcc dot gnu.org, schulz.benjamin at googlemail
dot com,
tschwinge at gcc dot gnu.org
Target Milestone: ---
CUDA 13 removes support for a bunch of old sm*. Reported downstream first at
https://bugs.gentoo.org/945296#c212 onwards.
We see:
```
configure:3792: checking for suffix of object files
configure:3814:
/var/tmp/portage/cross-nvptx-none/gcc-15.2.0/work/build/./gcc/xgcc
-B/var/tmp/portage/cross-nvptx-none/gcc-15.2.0/work/build/./gcc/
-B/usr/nvptx-none/bin/ -B/usr/nvptx-none/lib/ -isystem /usr/nvptx-none/include
-isystem /usr/nvptx-none/sys-include -c -g -O2 conftest.c >&5
ptxas fatal : Value 'sm_52' is not defined for option 'gpu-name'
nvptx-as: ptxas returned 255 exit status
```
Benjamin has worked around it with --with-arch=sm_89 with CUDA 12. Trying to
force newer with CUDA 13 seemed to fall over other issues (not tried it myself
yet).