From patchwork Fri Jun 7 14:40:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1111908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-502576-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Fxk9nb/u"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L4vP1YhWz9sNR for ; Sat, 8 Jun 2019 00:40:30 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=EX7uc/jVlT3tvmtcb IHKs34lnclKNUgTeDDBCiM96FVscIhfgYUHytuXHNrB0bBLYkQy8Nc4jEiuDu6qa oxyYhdmqDihDjosbso9B6j29rwRrSHDLT/skyJIgGJ6SrTJSMXulBHWeLhrKL7Du xfp3qUw+SFeKjKYEm22zrgFvBE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=elxIWBHgkRmdO+oL19B+deB MoGE=; b=Fxk9nb/u9NYOuAvb/rQMLRXCyHdSnsQuMjrapHBSv2kzusRTWR5UXQs n5Ua8dY14laLZL3qd7WgXvm4r9vvnsrdM7XVLBCiKuqNDz2GNCQBRg/ih0IcaalS DVnd/oPCvmcxFsWf9ip4Y+FYLG9iRGxWbrJqUakE1JJrCGlIzydI= Received: (qmail 58014 invoked by alias); 7 Jun 2019 14:40:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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, 7 Jun 2019 15:40:16 +0100 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: 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? 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; +}