From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F9283858CDB; Mon, 16 Jan 2023 19:14:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F9283858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673896444; bh=vVz0I8RWywJ8k+fwMa3ZjnVlZc1d8v+bayNYyOyDNPo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R78Ns+jRvwAdTusooJCplds/0qTSLWtUoWtLKgYr9uGw7dMhrosf0ACgQTKkLVWpJ m8uGMYUYVVHZSxLBsJp60FJPQOMsjZ3/rRIC56UR3fIiue9PgsOoenzZ/wIQdkGw1G rtO9K4UkIhNh+u+7qleZjHkxEanR4WaFzxwHjixA= From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/107950] partial LTO linking of libbackend.a: gcc/gcc-rich-location.cc:207: undefined reference to `range_label_for_type_mismatch::get_text(unsigned int) const' Date: Mon, 16 Jan 2023 19:14:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D107950 --- Comment #9 from Jan Hubicka --- >=20 > Feel free to grab my initial patch in c#0 and upstream it. I tried that s= ome > time ago in the following email thread: > https://gcc.gnu.org/pipermail/gcc/2021-May/236096.html Actually I was shooting for partial linking LTO streams just to make individual WPAs chaper. With -flinker-output=3Dnolto-rel we are effectively disabling most of benefits of LTO. My main problem was arranging the partial link only when stage1/2 compiler is used so bootstrap works with older GCCs which suports LTO but not partial linking yet. >=20 > >=20 > > I also think it is the case where partial linking makes the symbol to be > > pulled into LTO binary at the initial link time. It should be optimized > > away if linker was not complaining. >=20 > Optimize away during the partial linking? So you think it's a GCC issue w= hen it > comes to partial linking? No with partial linking you merge all the individual object files into single. So if lto frontned is not using some of libbackend entry point, you still get that code biult into it. So I think it is correct behaviour.=