https://gcc.gnu.org/g:2e2e7f904afc7c0d2d37430b4dc5355e561a3add
commit 2e2e7f904afc7c0d2d37430b4dc5355e561a3add Author: Thomas Schwinge <tschwi...@baylibre.com> Date: Wed Feb 19 09:30:45 2025 +0100 GCN, nvptx: Support '--enable-languages=all' ..., where "support" means that the build doesn't fail, but it doesn't mean that all target libraries get built and we get pretty test results for the additional languages. * configure.ac (unsupported_languages) [GCN, nvptx]: Add 'ada'. (noconfigdirs) [GCN, nvptx]: Add 'target-libobjc', 'target-libffi', 'target-libgo'. * configure: Regenerate. (cherry picked from commit ab35fc0d897011c6de075e000d1e0388e6359d4e) Diff: --- ChangeLog.omp | 10 ++++++++++ configure | 39 ++++++++++++++++++++++++++++++++++++++- configure.ac | 39 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 2 deletions(-) diff --git a/ChangeLog.omp b/ChangeLog.omp index 1b54affbe80a..8caf51a64e58 100644 --- a/ChangeLog.omp +++ b/ChangeLog.omp @@ -1,3 +1,13 @@ +2025-02-20 Thomas Schwinge <tschwi...@baylibre.com> + + Backported from trunk: + 2025-02-19 Thomas Schwinge <tschwi...@baylibre.com> + + * configure.ac (unsupported_languages) [GCN, nvptx]: Add 'ada'. + (noconfigdirs) [GCN, nvptx]: Add 'target-libobjc', + 'target-libffi', 'target-libgo'. + * configure: Regenerate. + 2018-12-20 Maciej W. Rozycki <ma...@codesourcery.com> * Makefile.def (lang_env_dependencies): Disable `cxx' dependency diff --git a/configure b/configure index 3b0abeb8b2e4..81ac2cf87a6a 100755 --- a/configure +++ b/configure @@ -3443,6 +3443,21 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then esac fi +# Disable Ada/GNAT on systems where it is known to not work. +# For testing, you can override this with --enable-languages=ada. +case ,${enable_languages}, in + *,ada,*) + ;; + *) + case "${target}" in + amdgcn*-*-* \ + | nvptx*-*-* ) + unsupported_languages="$unsupported_languages ada" + ;; + esac + ;; +esac + # Disable C++ on systems where it is known to not work. # For testing, you can override this with --enable-languages=c++. case ,${enable_languages}, in @@ -3471,6 +3486,16 @@ case ,${enable_languages}, in ;; esac +# Disable libobjc for some systems where it is known to not work. +case "${target}" in + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libobjc" + ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libobjc" + ;; +esac + # Disable D on systems where it is known to not work. # For testing, you can override this with --enable-languages=d. case ,${enable_languages}, in @@ -3551,6 +3576,9 @@ case "${target}" in alpha*-*-*vms*) noconfigdirs="$noconfigdirs target-libffi" ;; + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libffi" + ;; arm*-*-freebsd*) noconfigdirs="$noconfigdirs target-libffi" ;; @@ -3594,6 +3622,9 @@ case "${target}" in mmix-*-*) noconfigdirs="$noconfigdirs target-libffi" ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libffi" + ;; powerpc-*-aix*) ;; rs6000-*-aix*) @@ -3644,9 +3675,15 @@ if test x$enable_libgo = x; then *-*-cygwin* | *-*-mingw*) noconfigdirs="$noconfigdirs target-libgo" ;; + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libgo" + ;; bpf-*-*) noconfigdirs="$noconfigdirs target-libgo" ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libgo" + ;; esac fi @@ -4029,7 +4066,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gprof" ;; nvptx*-*-*) - noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3" ;; sh-*-*) case "${target}" in diff --git a/configure.ac b/configure.ac index 042681c27be5..9b338c4c5861 100644 --- a/configure.ac +++ b/configure.ac @@ -675,6 +675,21 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then esac fi +# Disable Ada/GNAT on systems where it is known to not work. +# For testing, you can override this with --enable-languages=ada. +case ,${enable_languages}, in + *,ada,*) + ;; + *) + case "${target}" in + amdgcn*-*-* \ + | nvptx*-*-* ) + unsupported_languages="$unsupported_languages ada" + ;; + esac + ;; +esac + # Disable C++ on systems where it is known to not work. # For testing, you can override this with --enable-languages=c++. case ,${enable_languages}, in @@ -703,6 +718,16 @@ case ,${enable_languages}, in ;; esac +# Disable libobjc for some systems where it is known to not work. +case "${target}" in + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libobjc" + ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libobjc" + ;; +esac + # Disable D on systems where it is known to not work. # For testing, you can override this with --enable-languages=d. case ,${enable_languages}, in @@ -780,6 +805,9 @@ case "${target}" in alpha*-*-*vms*) noconfigdirs="$noconfigdirs target-libffi" ;; + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libffi" + ;; arm*-*-freebsd*) noconfigdirs="$noconfigdirs target-libffi" ;; @@ -823,6 +851,9 @@ case "${target}" in mmix-*-*) noconfigdirs="$noconfigdirs target-libffi" ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libffi" + ;; powerpc-*-aix*) ;; rs6000-*-aix*) @@ -870,9 +901,15 @@ if test x$enable_libgo = x; then *-*-cygwin* | *-*-mingw*) noconfigdirs="$noconfigdirs target-libgo" ;; + amdgcn*-*-*) + noconfigdirs="$noconfigdirs target-libgo" + ;; bpf-*-*) noconfigdirs="$noconfigdirs target-libgo" ;; + nvptx*-*-*) + noconfigdirs="$noconfigdirs target-libgo" + ;; esac fi @@ -1255,7 +1292,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gprof" ;; nvptx*-*-*) - noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc" + noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3" ;; sh-*-*) case "${target}" in