From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by sourceware.org (Postfix) with ESMTPS id 86C5C3858D28 for ; Sun, 23 Jul 2023 06:46:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86C5C3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4R7v2r6KJXz1sCHB; Sun, 23 Jul 2023 08:46:28 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4R7v2r2GD4z1qqlW; Sun, 23 Jul 2023 08:46:28 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id IKM5pas-9dPo; Sun, 23 Jul 2023 08:46:27 +0200 (CEST) X-Auth-Info: 2bpN2BmDKmlAbIj1wUKrKv9uJ9T8YABBIpsoiWBiTurlPTXDJ6p4oL3HDz4vTyY0 Received: from tiger.home (aftr-62-216-205-254.dynamic.mnet-online.de [62.216.205.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 23 Jul 2023 08:46:27 +0200 (CEST) Received: by tiger.home (Postfix, from userid 1000) id 25F6C1D331A; Sun, 23 Jul 2023 08:46:27 +0200 (CEST) From: Andreas Schwab To: Andrew Pinski via Gcc-patches Cc: Andrew Pinski Subject: Re: [PATCH 1/2] Fix PR 110066: crash with -pg -static on riscv In-Reply-To: <20230723010645.1622083-1-apinski@marvell.com> (Andrew Pinski via Gcc-patches's message of "Sat, 22 Jul 2023 18:06:44 -0700") References: <20230723010645.1622083-1-apinski@marvell.com> X-Yow: I want the presidency so bad I can already taste the hors d'oeuvres. Date: Sun, 23 Jul 2023 08:46:27 +0200 Message-ID: <87jzurjfb0.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Jul 22 2023, Andrew Pinski via Gcc-patches wrote: > The problem -fasynchronous-unwind-tables is on by default for riscv linux > We need turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point > to .eh_frame data from crtbeginT.o instead of the user-defined object > during static linking. > > This turns it off. Since this is a recurring problem, and difficult to notice (see how long the aarch64 case went unnoticed), it should be fixed generically, instead of having to patch every case separately. > diff --git a/libgcc/config/riscv/t-crtstuff b/libgcc/config/riscv/t-crtstuff > new file mode 100644 > index 00000000000..685d11b3e66 > --- /dev/null > +++ b/libgcc/config/riscv/t-crtstuff > @@ -0,0 +1,5 @@ > +# -fasynchronous-unwind-tables -funwind-tables is on by default for riscv linux > +# We turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point > +# to .eh_frame data from crtbeginT.o instead of the user-defined object > +# during static linking. > +CRTSTUFF_T_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables What about CRTSTUFF_T_CFLAGS_S? -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."