From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD6743858CDB; Thu, 23 Mar 2023 15:58:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD6743858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679587128; bh=kYfCCZx0k/1Y8UNRpj20TZIB+rX/oDuBgdjbxnY/qD4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eSQhGF+Wt7tFW+yv86cSUSGnd3FFL1TfzCU9xiURqIQupsLGDIK4ZEoFRHxGSNkJI X6YlVRN5tQWe3lUGCbxJW2WwmsCmaFdt3RqJwTZpjedwj0yuuC/T4OOiyzcQDzds7B wgVwTHGP4Eu9Ms0xrZxVfUKMTaFnOMLg1CUmwvvU= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/109263] '-g0 -ggdb -flto' gives linker error Date: Thu, 23 Mar 2023 15:58:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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=3D109263 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org --- Comment #2 from Richard Biener --- So we stream -g in .lto_options and we do have early LTO debug. But then nothing combines -g0 -ggdb in the driver so lto-wrapper also sees -g0 and thinks that will prevail, setting skip_debug to true. Unfortunately -ggdb isn't just -g with "gdb" as arg but an entirely separate option. Interestingly -gno-dwarf enables debug info as well.=