From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58011 invoked by alias); 7 Jun 2019 14:40:23 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 57998 invoked by uid 89); 7 Jun 2019 14:40:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Jun 2019 14:40:22 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hZG2W-0004Z0-Re from Andrew_Stubbs@mentor.com ; Fri, 07 Jun 2019 07:40:20 -0700 Received: from [127.0.0.1] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Fri, 7 Jun 2019 15:40:17 +0100 Subject: [PATCH 2/3] Stub implementation of unwinding for AMD GCN. To: "gcc-patches@gcc.gnu.org" , Fortran List References: From: Andrew Stubbs Message-ID: Date: Fri, 07 Jun 2019 14:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------3DE78220053325A1958EEA0A" X-SW-Source: 2019-06/txt/msg00025.txt.bz2 --------------3DE78220053325A1958EEA0A Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 345 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 --------------3DE78220053325A1958EEA0A Content-Type: text/x-patch; name="190607-gcn-stub-unwinding.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="190607-gcn-stub-unwinding.patch" Content-length: 2105 Stub implementation of unwinding for AMD GCN. 2019-06-07 Andrew Stubbs 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 + . */ + +#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; +} --------------3DE78220053325A1958EEA0A--