From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 5A4B8385803B for ; Thu, 4 Nov 2021 12:12:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5A4B8385803B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C80E9302FBA6; Thu, 4 Nov 2021 13:12:30 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 990A1413CD45; Thu, 4 Nov 2021 13:12:29 +0100 (CET) Message-ID: Subject: Re: [PATCH v2] Improve building with LTO From: Mark Wielaard To: "Dmitry V. Levin" , elfutils-devel@sourceware.org Date: Thu, 04 Nov 2021 13:12:29 +0100 In-Reply-To: <20211104112320.GA732@altlinux.org> References: <20210214235718.7654b5f1.alex.miller@gmx.de> <20210218033856.18053044.alex.miller@gmx.de> <20210828093143.GA720@altlinux.org> <20211104112320.GA732@altlinux.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2021 12:12:34 -0000 Hi Dmitry, On Thu, 2021-11-04 at 14:23 +0300, Dmitry V. Levin wrote: > On Sat, Aug 28, 2021 at 12:31:43PM +0300, Dmitry V. Levin wrote: > > On Thu, Feb 18, 2021 at 03:38:56AM +0100, Alexander Miller via > > Elfutils-devel wrote: > > > From: Alexander Miller > > >=20 > > > Use symver attribute for symbol versioning instead of .symver > > > assembler directive when available. Convert to use double @ > > > syntax > > > for default version in all cases (required when using the > > > attribute). > > >=20 > > > Add the attributes externally_visible, no_reorder if available > > > when > > > using assembler directives to improve the situation for < gcc-10. > > > This is not 100% reliable, though; -flto-partition=3Dnone may still > > > be > > > needed in some cases. > > >=20 > > > Note that -Wno-error=3Dstack-usage=3D is still needed to build with > > > LTO. > > >=20 > > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D24498 > > > Signed-off-by: Alexander Miller > > > --- > > > lib/ChangeLog | 13 +++++++ > > > lib/eu-config.h | 65 +++++++++++++++++++++++++++- > > > ------ > > > libdw/ChangeLog | 11 ++++++ > > > libdw/dwarf_aggregate_size.c | 4 +-- > > > libdw/dwarf_arrayorder.c | 2 +- > > > libdw/dwarf_bitoffset.c | 2 +- > > > libdw/dwarf_bitsize.c | 2 +- > > > libdw/dwarf_bytesize.c | 2 +- > > > libdw/dwarf_decl_column.c | 2 +- > > > libdw/dwarf_decl_file.c | 2 +- > > > libdw/dwarf_decl_line.c | 2 +- > > > libdw/dwarf_srclang.c | 4 +-- > > > libdwelf/ChangeLog | 5 +++ > > > libdwelf/dwelf_elf_begin.c | 2 +- > > > libdwfl/ChangeLog | 7 ++++ > > > libdwfl/core-file.c | 4 +-- > > > libdwfl/dwfl_module_build_id.c | 4 +-- > > > libdwfl/dwfl_report_elf.c | 4 +-- > > > 18 files changed, 107 insertions(+), 30 deletions(-) > >=20 > > ping? >=20 > FWiW, I applied this patch in ALT's elfutils package about 2 months > ago. > Thanks to -Wstack-usage fixes merged, it no longer requires > -Wno-error=3Dstack-usage=3D to build with LTO. Thanks. This patch was indeed one reason I kept postponing the release, because I didn't have have time to properly review it. Which gcc versions have you tried this against (with/without -flto?) I admit I am still a bit nervous about the switch away from @@@ to just @ and @@. I was secretly hoping gcc would add @@@ support to the symver attribute. But that doesn't seem to be happening, and even if it did, it would be gcc 12+ only. So maybe we can include it for this release and just tell people they may keep the pieces if they use -flto. But it does also impact symbol versioning for non-lto builds, so I am still a little hesitant. I'll try to do some tests to make sure things look ok with different gcc versions. Cheers, Mark