From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F19FB385DC23; Wed, 15 Apr 2020 13:56:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F19FB385DC23 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug general/24498] 0.176: isn't LTO ready Date: Wed, 15 Apr 2020 13:56:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: general X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 15 Apr 2020 13:56:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24498 --- Comment #13 from Mark Wielaard --- (In reply to Martin Li=C5=A1ka from comment #11) > (In reply to kloczek from comment #10) > > > I would add a configure option --enable-lto that will append -flto to= {C,LD}FLAGS. > >=20 > > Please don't do that. > >=20 > > LTO can be driven using only env variable. > >=20 > > % CFLAGS=3D"" LDFLAGS=3D"" ./configure >=20 > Works for me. Sorry, but what are the clto_cflags and lto_ldflags precisely? And we now (also) have some c++ code for the debuginfod server, which I ass= ume needs some CXXFLAGS too? > > Please use KISS principle and do not implement something which can be > > already done other way *without* touching existing code. > >=20 > > PS. Changing {C,LD}FLAGS is not only part of using LTO. You need to pas= s NM, > > RANLIB and AR env variables. >=20 > Not necessarily. Typical Linux systems, like openSUSE, utilize auto-loadi= ng > mechanism of LTO plugins: On Fedora32 that doesn't seem to work with: $ CFLAGS=3D"-O2 -g -flto" CXXFLAGS=3D"-O2 -g -flto" LDFLAGS=3D"-flto" ./con= figure --enable-maintainer-mode $ make [...] ar: elf_version.o: plugin needed to handle lto object ranlib libelf.a ranlib: libelf.a(elf_version.o): plugin needed to handle lto object Am I using the wrong flags? Or are the default ar and ranlib tools not build with the correct flags? --=20 You are receiving this mail because: You are on the CC list for the bug.=