]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
GCN, nvptx: Define '_Unwind_DeleteException'
authorThomas Schwinge <tschwinge@baylibre.com>
Tue, 18 Mar 2025 09:10:30 +0000 (10:10 +0100)
committerThomas Schwinge <tschwinge@baylibre.com>
Thu, 17 Apr 2025 07:36:32 +0000 (09:36 +0200)
This resolves GCN:

    ld: error: undefined symbol: _Unwind_DeleteException
    >>> referenced by eh_catch.cc:109 ([...]/source-gcc/libstdc++-v3/libsupc++/eh_catch.cc:109)
    >>>               eh_catch.o:(__cxa_end_catch) in archive [...]/build-gcc/amdgcn-amdhsa/libstdc++-v3/src/.libs/libstdc++.a
    [...]
    collect2: error: ld returned 1 exit status

..., and nvptx:

    unresolved symbol _Unwind_DeleteException
    collect2: error: ld returned 1 exit status

For both GCN, nvptx, this each progresses ~100 'check-gcc-c++',
and ~500 'check-target-libstdc++-v3' test cases:

    [-FAIL:-]{+PASS:+} [...] (test for excess errors)

..., with (if applicable, for most of them):

    [-UNRESOLVED:-]{+PASS:+} [...] [-compilation failed to produce executable-]{+execution test+}

..., or just a few 'FAIL: [...] execution test' where these test cases now
FAIL for unrelated reasons, or, if applicable, FAIL due to run-time
'GCC/nvptx: sorry, unimplemented: dynamic stack allocation not supported'.

libgcc/
* config/gcn/unwind-gcn.c (_Unwind_DeleteException): New.
* config/nvptx/unwind-nvptx.c (_Unwind_DeleteException): Likewise.

(cherry picked from commit 815abd68353751d53ed9299e218f8ca1cc108d5f)

libgcc/ChangeLog.omp
libgcc/config/gcn/unwind-gcn.c
libgcc/config/nvptx/unwind-nvptx.c

index a03e92b34aed20cb0fd64b9af5ba7a906b8d4a22..2683de6b824920c15a416f4f9f97e2a1e3f1e510 100644 (file)
@@ -1,5 +1,11 @@
 2025-04-17  Thomas Schwinge  <tschwinge@baylibre.com>
 
+       Backported from trunk:
+       2025-04-08  Thomas Schwinge  <tschwinge@baylibre.com>
+
+       * config/gcn/unwind-gcn.c (_Unwind_DeleteException): New.
+       * config/nvptx/unwind-nvptx.c (_Unwind_DeleteException): Likewise.
+
        Backported from trunk:
        2025-04-07  Thomas Schwinge  <tschwinge@baylibre.com>
 
index d08ba266be10c67715bfc0eb6e8c41dbbcbe06d8..2ee389b195335a1af7eb25fecad4805f0adaf480 100644 (file)
 
 #include "unwind.h"
 
+void
+_Unwind_DeleteException (struct _Unwind_Exception *exc)
+{
+  if (exc->exception_cleanup)
+    (*exc->exception_cleanup) (_URC_FOREIGN_EXCEPTION_CAUGHT, exc);
+}
+
 _Unwind_Reason_Code
 _Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument)
 {
index d08ba266be10c67715bfc0eb6e8c41dbbcbe06d8..2ee389b195335a1af7eb25fecad4805f0adaf480 100644 (file)
 
 #include "unwind.h"
 
+void
+_Unwind_DeleteException (struct _Unwind_Exception *exc)
+{
+  if (exc->exception_cleanup)
+    (*exc->exception_cleanup) (_URC_FOREIGN_EXCEPTION_CAUGHT, exc);
+}
+
 _Unwind_Reason_Code
 _Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument)
 {