From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 8D6B53858C83 for ; Wed, 15 Mar 2023 20:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D6B53858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org From: "Andreas K. Huettel" To: binutils@sourceware.org Cc: toolchain@gentoo.org Subject: Re: [PATCH, needs more eyes] Relink also libopcodes and libgprofng to newly built libiberty.a Date: Wed, 15 Mar 2023 21:51:15 +0100 Message-ID: <1724922.vCJZsxu672@pinacolada> Organization: Gentoo Linux In-Reply-To: <20230228224937.3832887-1-dilfridge@gentoo.org> References: <20230228224937.3832887-1-dilfridge@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5912859.31tnzDBltd"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --nextPart5912859.31tnzDBltd Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1" From: "Andreas K. Huettel" To: binutils@sourceware.org Cc: toolchain@gentoo.org Date: Wed, 15 Mar 2023 21:51:15 +0100 Message-ID: <1724922.vCJZsxu672@pinacolada> Organization: Gentoo Linux In-Reply-To: <20230228224937.3832887-1-dilfridge@gentoo.org> References: <20230228224937.3832887-1-dilfridge@gentoo.org> MIME-Version: 1.0 Big apology for the silence, a heap of unrelated work got in the way. I'll respond in a few days when the worst is over.. :| =46WIW, I got several confirmations in the meantime that the patch solves our problem in Gentoo ... Am Dienstag, 28. Februar 2023, 23:49:37 CET schrieb Andreas K. H=FCttel: > For Gentoo users, after updating gcc, a subsequent build of > binutils can fail during "make install" with the following symptoms: >=20 > lto1: fatal error: bytecode stream in file '/usr/lib64/binutils/x86_64-pc= =2Dlinux-gnu/2.37_p1/libiberty.a' generated with LTO version 11.0 instead o= f the expected 11.2 > compilation terminated. >=20 > The relink command picks up the installed version of libiberty.a > instead of the just built one. This commit addresses the issue by > replicating the workaround made in 7d53105d for libctf also for > libopcodes and libgprofng. >=20 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29042 > Bug: https://bugs.gentoo.org/834720 > Signed-off-by: Andreas K. H=FCttel > --- > gprofng/src/Makefile.am | 3 ++- > gprofng/src/Makefile.in | 3 ++- > opcodes/configure | 4 ++-- > opcodes/configure.ac | 4 ++-- > 4 files changed, 8 insertions(+), 6 deletions(-) >=20 > diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am > index ab90bb08c5f..96256faf788 100644 > --- a/gprofng/src/Makefile.am > +++ b/gprofng/src/Makefile.am > @@ -131,7 +131,8 @@ libgprofng_la_LDFLAGS =3D -version-info 0:0:0 > # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being= empty > # when -nostdlib is passed to libtool. > # See bug 29364 - libgprofng.so: needs to link against -pthread > -libgprofng_la_LIBADD =3D $(top_builddir)/../opcodes/libopcodes.la \ > +libgprofng_la_LIBADD =3D $(GPROFNG_LIBADD) \ > + $(top_builddir)/../opcodes/libopcodes.la \ > $(top_builddir)/../bfd/libbfd.la \ > $(GPROFNG_LIBADD) \ > -lpthread -ldl > diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in > index 605fa4f6fd4..f968d8d6e59 100644 > --- a/gprofng/src/Makefile.in > +++ b/gprofng/src/Makefile.in > @@ -555,7 +555,8 @@ libgprofng_la_LDFLAGS =3D -version-info 0:0:0 > # Pass -lpthread instead of $(PTHREAD_LIBS) due to $(PTHREAD_LIBS) being= empty > # when -nostdlib is passed to libtool. > # See bug 29364 - libgprofng.so: needs to link against -pthread > -libgprofng_la_LIBADD =3D $(top_builddir)/../opcodes/libopcodes.la \ > +libgprofng_la_LIBADD =3D $(GPROFNG_LIBADD) \ > + $(top_builddir)/../opcodes/libopcodes.la \ > $(top_builddir)/../bfd/libbfd.la \ > $(GPROFNG_LIBADD) \ > -lpthread -ldl > diff --git a/opcodes/configure b/opcodes/configure > index 8717d99ca26..fbdf41f87be 100755 > --- a/opcodes/configure > +++ b/opcodes/configure > @@ -12445,10 +12445,10 @@ if test "$enable_shared" =3D "yes"; then > case "${host}" in > *-*-cygwin*) > SHARED_LDFLAGS=3D"-no-undefined" > - SHARED_LIBADD=3D"-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -libert= y $SHARED_LIBADD" > + SHARED_LIBADD=3D"$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../li= biberty -liberty $SHARED_LIBADD" > ;; > *) > - SHARED_LIBADD=3D"../bfd/libbfd.la ${SHARED_LIBADD}" > + SHARED_LIBADD=3D"${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD= }" > SHARED_DEPENDENCIES=3D"../bfd/libbfd.la" > ;; > esac > diff --git a/opcodes/configure.ac b/opcodes/configure.ac > index 1beb72e87e0..79310916f7d 100644 > --- a/opcodes/configure.ac > +++ b/opcodes/configure.ac > @@ -193,10 +193,10 @@ if test "$enable_shared" =3D "yes"; then > case "${host}" in > *-*-cygwin*) > SHARED_LDFLAGS=3D"-no-undefined" > - SHARED_LIBADD=3D"-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -libert= y $SHARED_LIBADD" > + SHARED_LIBADD=3D"$SHARED_LIBADD -L`pwd`/../bfd -lbfd -L`pwd`/../li= biberty -liberty $SHARED_LIBADD" > ;; > *) > - SHARED_LIBADD=3D"../bfd/libbfd.la ${SHARED_LIBADD}" > + SHARED_LIBADD=3D"${SHARED_LIBADD} ../bfd/libbfd.la ${SHARED_LIBADD= }" > SHARED_DEPENDENCIES=3D"../bfd/libbfd.la" > ;; > esac >=20 =2D-=20 Andreas K. H=FCttel dilfridge@gentoo.org Gentoo Linux developer (council, toolchain, base-system, perl, libreoffice) --nextPart5912859.31tnzDBltd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAABCgB9FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmQSL8NfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZE MTlFNkQzMUIxOTJFRTREQzYzRUFEM0RDMkIxNjIxNUVENTQxMkEACgkQ3CsWIV7V QSoKchAAjorbgpqFp7MM1AdHLhBIjFKfr0ckMmT8783fbwZ+jP5z+Z48cUwujvvh 3nkl9c1waqtraCCMXvF2phQQ0eyRYjB2yB6BidA2OLhH4KqZivMBoUhmZchMFjba OY+O933NwKrhl3Izj6ccnLTAZHyYYHOiPe7ilGUZy/2NvCKkkfdKfcuRjW0LAysY /PkshVRSehhb/n68RCgc2PvobI7QbqvdjYD84+5ArzkT49z7ISjxPMZAwC9GHXYe W4+ZtPJrATwLE4r/Oha+GA8VLMq+uP5RokcytBTkPPiE7SW9/oR1qsFiybyTdJDx VpB+xwEdrTXAIcfoRanNgpLH/e/Am0LRXLC/Um4Zunn0fPNfsJd93kFJKcudeKKP KxXEoKnHA77mVBotErkMifMbGd3KWZZgYG09SrP3ZfhR1k+JFFPLb/AIZbG3fvW4 IqpDGgSMa5P8zSPd1x/FFYr695nLpl++f+2LhvC2m6BF+2cUBLXxKiWQqr65RuKB yEBWeTtGN0Q0Uj9aqgJTN1Ib+wyMQlV9oPIUTuJGVb34aKZzEOJvLdmYcr/AmQWL WxdpA1CL6gpp6JC+R8Bq8ztGG4rzW0V+n3ZeoCpxQPzRmzY2ULrPnT3Sw/BYs27O oqwz02R/n1o2MoB6YCXNRaL2/p4N/MOlHcIks+6mcCETK5wDPqE= =vbMu -----END PGP SIGNATURE----- --nextPart5912859.31tnzDBltd--