From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DAEE3858C54; Mon, 4 Sep 2023 06:26:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DAEE3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693808770; bh=N5flEo3mH0HH7rGm9hYTcVmQ3KKBdEPumW6sazAAGNw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mprywEfBt873B/YAOx7SMTz5OVlSu139maBYKclrykSkg3wWRe+ZNpHWZkXIcQf/7 GEF0/7BZ156LHmFO3oV1xr9lBtj4BvAKitwrh6MDinrkBoZkP8jfrW7Oft6XeGowys dQQotzkuxy2zI7tTBXBIWVxeIu/obvIy5632ahmo= From: "i at rvalue dot moe" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110066] [13 Regression] [RISC-V] Segment fault if compiled with -static -pg Date: Mon, 04 Sep 2023 06:26:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: EH, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: i at rvalue dot moe X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110066 --- Comment #26 from rvalue --- (In reply to CVS Commits from comment #22) > The trunk branch has been updated by Andrew Pinski : >=20 > https://gcc.gnu.org/g:bbc1a102735c72e3c5a4dede8ab382813d12b058 >=20 > commit r14-2733-gbbc1a102735c72e3c5a4dede8ab382813d12b058 > Author: Andrew Pinski > Date: Sat Jul 22 08:52:42 2023 -0700 >=20 > Fix PR 110066: crash with -pg -static on riscv >=20=20=20=20=20 > The problem -fasynchronous-unwind-tables is on by default for riscv l= inux > 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. >=20=20=20=20=20 > This turns it off. >=20=20=20=20=20 > OK? >=20=20=20=20=20 > libgcc/ChangeLog: >=20=20=20=20=20 > * config.host (riscv*-*-linux*): Add t-crtstuff to tmake_file. > (riscv*-*-freebsd*): Likewise. > * config/riscv/t-crtstuff: New file. Confirmed that the patch works for me.=