From: Andrew Stubbs <ams@codesourcery.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Fortran List <fortran@gcc.gnu.org>
Subject: [PATCH 2/3] Stub implementation of unwinding for AMD GCN.
Date: Fri, 07 Jun 2019 14:40:00 -0000 [thread overview]
Message-ID: <faf4f420-e596-ec4f-dbee-1f73e3b98563@codesourcery.com> (raw)
In-Reply-To: <d5a663a1-8978-2380-ba18-27eb35eb47b8@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
This patch provides the "_Unwind_Backtrace" and "_Unwind_GetIPInfo"
symbols required to link programs using libgfortran.
I do not wish to implement proper backtracing at this time (I have other
things to work on), and IIUC none of the existing implementations will
Just Work.
OK to commit?
--
Andrew Stubbs
Mentor Graphics / CodeSourcery
[-- Attachment #2: 190607-gcn-stub-unwinding.patch --]
[-- Type: text/x-patch, Size: 2105 bytes --]
Stub implementation of unwinding for AMD GCN.
2019-06-07 Andrew Stubbs <ams@codesourcery.com>
libgcc/
* config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c.
* config/gcn/unwind-gcn.c: New file.
diff --git a/libgcc/config/gcn/t-amdgcn b/libgcc/config/gcn/t-amdgcn
index 8687c9f3d9f..adbd866a1d9 100644
--- a/libgcc/config/gcn/t-amdgcn
+++ b/libgcc/config/gcn/t-amdgcn
@@ -1,5 +1,6 @@
LIB2ADD += $(srcdir)/config/gcn/lib2-divmod.c \
- $(srcdir)/config/gcn/lib2-divmod-hi.c
+ $(srcdir)/config/gcn/lib2-divmod-hi.c \
+ $(srcdir)/config/gcn/unwind-gcn.c
LIB2ADDEH=
LIB2FUNCS_EXCLUDE=__main
diff --git a/libgcc/config/gcn/unwind-gcn.c b/libgcc/config/gcn/unwind-gcn.c
new file mode 100644
index 00000000000..8aa84d372c3
--- /dev/null
+++ b/libgcc/config/gcn/unwind-gcn.c
@@ -0,0 +1,37 @@
+/* Stub unwinding implementation.
+
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Contributed by Mentor Graphics
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "unwind.h"
+
+_Unwind_Reason_Code
+_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument)
+{
+ return 0;
+}
+
+_Unwind_Ptr
+_Unwind_GetIPInfo (struct _Unwind_Context *c, int *ip_before_insn)
+{
+ return 0;
+}
next prev parent reply other threads:[~2019-06-07 14:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 14:38 [PATCH 0/3] Enable full libgfortran " Andrew Stubbs
2019-06-07 14:39 ` [PATCH 1/3] Create GCN-specific gthreads Andrew Stubbs
2019-06-19 8:57 ` Andrew Stubbs
2019-06-19 16:04 ` Jeff Law
2019-06-19 16:56 ` Andrew Stubbs
2019-06-19 16:59 ` Jeff Law
2023-11-03 14:54 ` GCN: Address undeclared 'NULL' usage in 'libgcc/config/gcn/gthr-gcn.h:__gthread_getspecific' (was: [PATCH 1/3] Create GCN-specific gthreads) Thomas Schwinge
2019-06-07 14:40 ` Andrew Stubbs [this message]
2019-06-19 8:58 ` [PATCH 2/3] Stub implementation of unwinding for AMD GCN Andrew Stubbs
2019-06-19 16:05 ` Jeff Law
2019-06-19 16:57 ` Andrew Stubbs
2019-06-07 14:41 ` [PATCH 3/3] Enable full libgfortran library " Andrew Stubbs
2019-06-14 16:17 ` Janne Blomqvist
2019-06-19 16:05 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=faf4f420-e596-ec4f-dbee-1f73e3b98563@codesourcery.com \
--to=ams@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).