From patchwork Sat Aug 29 13:18:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1353691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=QDV8Z41G; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bdxqs6rwhz9sTQ for ; Sat, 29 Aug 2020 23:18:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93D3F3861899; Sat, 29 Aug 2020 13:18:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93D3F3861899 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598707124; bh=ax1xfXsUuZYIBxKDL7uThHCrWllvml5sSv/Wj0qB4qU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=QDV8Z41GSkBzz5ByTgtBEIH0wkt/GNze5OHtwr2X0/usVhJyh13k9fKXShSvGYwrH 2kWlMzoV0xAnuy5i3kWw/YOL8UMQSXHOiF8o0/EnEhb7R40bLp5q9vyoeNSDAgw4D7 R7Xx0XjdDVir86iT4kiL4eCjHd2dy6pA1+5NHWs8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by sourceware.org (Postfix) with ESMTPS id 7B0933861011 for ; Sat, 29 Aug 2020 13:18:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7B0933861011 IronPort-SDR: crRE/1to1TpAk9iAEmuKrm+9epRfnXsll+X9rYPlzjLsOre/A5wLZPfeoUrdBRBbhLbHtkR4cn FKnZvXfwbRy4Mwlwh2ME6ULZ7voRVHRINFhwnsmDGjZ45K2KTowux09FOYx8h/xjn8cDZN6c45 H/YDXjend4KBTXXn/FBal5cP1JQgA9/NzolQJyPENxYf0iHt1fHDJ5FEjguSNQu8TjZmLdD657 pcgK78kuUqKbYky7dYDUCtVqi1Oymncyj23HFDLwyNb03rN6gYEWoPLKA7k9U29Tr9uxCreOzI uEk= X-IronPort-AV: E=Sophos;i="5.76,367,1592841600"; d="scan'208";a="147346522" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 29 Aug 2020 21:18:41 +0800 IronPort-SDR: PUYi23lHk8bWnvCyZRnv8X+8sgRjbhrdzZcVHo1CQ2EaGnUt48PbIriWXWZDiUJg50pH/0Cqgk svGwUXgCk23g== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2020 06:05:23 -0700 IronPort-SDR: ZnbW7tui5w7zDmvUP8mmRRneZR3NQD8MxF7iHQ0HgIYD+yDpFbq2E+TN8CAyzbuS35RF61jRKp 5o74fglv6X9w== WDCIronportException: Internal Received: from unknown (HELO redsun52) ([10.149.66.28]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2020 06:18:40 -0700 Date: Sat, 29 Aug 2020 14:18:34 +0100 (BST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V/libgcc: Use `-fasynchronous-unwind-tables' for LIB2_DIVMOD_FUNCS Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Maciej W. Rozycki via Gcc-patches" From: "Maciej W. Rozycki" Reply-To: "Maciej W. Rozycki" Cc: Andrew Waterman , Kito Cheng , Andreas Schwab Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Use `-fasynchronous-unwind-tables' rather than `-fexceptions -fnon-call-exceptions' in LIB2_DIVMOD_FUNCS compilation flags so as to provide unwind tables for the affected functions while not pulling the unwinder proper, which is not required here. Beyond saving program space it fixes a RISC-V glibc build error due to unsatisfied `malloc' and `free' references from the unwinder causing link errors with `ld.so' where libgcc has been built at -O0. libgcc/ * config/riscv/t-elf (LIB2_DIVMOD_EXCEPTION_FLAGS): New variable. --- Hi, As Mon, Aug 31st (a bank holiday in England) will be my last day at Western Digital and I won't be able to submit patches on behalf of the company afterwards here is a replacement change for RISC-V only in case the generic one discussed here: