diff --git a/ChangeLog.omp b/ChangeLog.omp index 8caf51a64e58..6a0f75409039 100644 --- a/ChangeLog.omp +++ b/ChangeLog.omp @@ -1,3 +1,14 @@ +2025-03-19 Thomas Schwinge + + Backported from trunk: + 2025-03-14 Thomas Schwinge + + PR target/92713 + PR target/101544 + * configure.ac [GCN, nvptx] (noconfigdirs): Don't add + 'target-libstdc++-v3'. Add 'target-libgrust'. + * configure: Regenerate. + 2025-02-20 Thomas Schwinge Backported from trunk: diff --git a/configure b/configure index 81ac2cf87a6a..a4da7d165fdf 100755 --- a/configure +++ b/configure @@ -3423,10 +3423,6 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then # VxWorks uses the Dinkumware C++ library. noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; - amdgcn*-*-*) - # Not ported/fails to build when using newlib. - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; arm*-wince-pe*) # the C++ libraries don't build on top of CE's C libraries noconfigdirs="$noconfigdirs target-libstdc++-v3" @@ -4066,7 +4062,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gprof" ;; nvptx*-*-*) - noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3" + noconfigdirs="$noconfigdirs target-libssp" ;; sh-*-*) case "${target}" in @@ -9400,6 +9396,16 @@ case ,${enable_languages}, in # Disable target libgrust if we're not building target libstdc++. noconfigdirs="$noconfigdirs target-libgrust" ;; + *) + case "${target}" in + amdgcn*-*-* \ + | nvptx*-*-* ) + # Build fails in 'libgrust/libproc_macro_internal/': + # sorry, unimplemented: exception handling not supported + noconfigdirs="$noconfigdirs target-libgrust" + ;; + esac + ;; esac ;; esac diff --git a/configure.ac b/configure.ac index 9b338c4c5861..17cf51a33001 100644 --- a/configure.ac +++ b/configure.ac @@ -655,10 +655,6 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then # VxWorks uses the Dinkumware C++ library. noconfigdirs="$noconfigdirs target-libstdc++-v3" ;; - amdgcn*-*-*) - # Not ported/fails to build when using newlib. - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; arm*-wince-pe*) # the C++ libraries don't build on top of CE's C libraries noconfigdirs="$noconfigdirs target-libstdc++-v3" @@ -1292,7 +1288,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gprof" ;; nvptx*-*-*) - noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3" + noconfigdirs="$noconfigdirs target-libssp" ;; sh-*-*) case "${target}" in @@ -2546,6 +2542,16 @@ case ,${enable_languages}, in # Disable target libgrust if we're not building target libstdc++. noconfigdirs="$noconfigdirs target-libgrust" ;; + *) + case "${target}" in + amdgcn*-*-* \ + | nvptx*-*-* ) + # Build fails in 'libgrust/libproc_macro_internal/': + # sorry, unimplemented: exception handling not supported + noconfigdirs="$noconfigdirs target-libgrust" + ;; + esac + ;; esac ;; esac diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index aa8a61d36385..31e79a89e884 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,13 @@ +2025-03-19 Thomas Schwinge + + Backported from trunk: + 2025-03-14 Thomas Schwinge + + PR target/92713 + PR target/101544 + * config/gcn/gcn.h (LIBSTDCXX): Don't set. + * config/nvptx/nvptx.h (LIBSTDCXX): Likewise. + 2025-02-28 Thomas Schwinge Backported from trunk: diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h index cb65dbbed6df..8a47f3267cc4 100644 --- a/gcc/config/gcn/gcn.h +++ b/gcc/config/gcn/gcn.h @@ -860,7 +860,3 @@ enum gcn_builtin_codes || M == V2SFmode || M == V2DImode || M == V2DFmode) \ ? 2 \ : 1) - -/* The C++ front end insists to link against libstdc++ -- which we don't build. - Tell it to instead link against the innocuous libgcc. */ -#define LIBSTDCXX "gcc" diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 9e8c0e4d65cb..375ae7ba9488 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -385,10 +385,6 @@ struct GTY(()) machine_function /* See 'libgcc/config/nvptx/crt0.c' for wrapping of 'main'. */ #define HAS_INIT_SECTION -/* The C++ front end insists to link against libstdc++ -- which we don't build. - Tell it to instead link against the innocuous libgcc. */ -#define LIBSTDCXX "gcc" - /* The default doesn't fly ('internal compiler error: in simplify_subreg' when 'dw2_assemble_integer' -> 'assemble_integer' attempts to simplify '(minus:DI (symbol_ref:DI ("$LEHB0")) (symbol_ref:DI ("$LFB3")))', for