From owner-svn-src-all@freebsd.org Tue Oct 16 10:18:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1800410C8DBD; Tue, 16 Oct 2018 10:18:25 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C07B1851B7; Tue, 16 Oct 2018 10:18:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 92F952117C; Tue, 16 Oct 2018 10:18:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 8119289CE0; Tue, 16 Oct 2018 12:18:23 +0200 (CEST) Date: Tue, 16 Oct 2018 12:18:23 +0200 From: Baptiste Daroussin To: Konstantin Belousov Cc: Antoine Brodin , Ed Maste , Gerald Pfeifer , re , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r339350 - head/contrib/elftoolchain/elfcopy Message-ID: <20181016101822.gxsuvtczywpxqmiy@ivaldir.net> References: <201810132126.w9DLQ73C022496@repo.freebsd.org> <20181016072614.GO5335@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5mnps4f4lfeoxi7i" Content-Disposition: inline In-Reply-To: <20181016072614.GO5335@kib.kiev.ua> User-Agent: NeoMutt/20180716 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2018 10:18:25 -0000 --5mnps4f4lfeoxi7i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 16, 2018 at 10:26:14AM +0300, Konstantin Belousov wrote: > On Tue, Oct 16, 2018 at 07:39:32AM +0200, Antoine Brodin wrote: > > On Mon, Oct 15, 2018 at 3:53 PM Ed Maste wrote: > > > On Mon, 15 Oct 2018 at 07:13, Ed Maste wrote: > > > > Hi Antoine, did you bisect to this rev or does it just look like the > > > > most probable candidate? Can you copy a pair of differing .o files > > > > (say, gcc/cc1plus-checksum.o) from the work dir to freefall? > > > > > > Antoine provided a tarball of the work dir to me, and pointed out that > > > the *-checksum.o files are not interesting - they are warnings only > > > and are present prior to the identified change. > > > > > > Comparing one of the other differing files, e.g. > > > stage{2,3}-gcc/expmed.o, demonstrates the problem. Gcc's build > > > machinery is reasonably obfuscated so I'm not sure of the exact set of > > > operations, but I can infer that the stage2/stage3 comparison is > > > running strip on the object files and then comparing the result. Gcc > > > is encountering this part of my strip/objcopy change: > > > > > > > Stripping binaries with relocations > > > > referencing removed symbols was already broken, and after this chan= ge > > > > may still be broken in a different way. > > > > > > Stripping symbols and relocations from an object file is not a > > > particularly useful operation, since the object then can't be linked > > > or otherwise used. But it seems Gcc's stage comparison relies on this. > > > I did try running "strip --strip-debug" on stage{2,3}-gcc/expmed.o (a > > > reasonable operation on object files) and that produced identical > > > output. > > > > > > It may well be that a further change to ELF Tool Chain's strip is > > > warranted, but I suspect the most straightforward and reliable fix > > > here will be to just have gcc use GNU strip. > >=20 > > The attached patch for the gcc ports fixes the failures for me. > >=20 > > Antoine >=20 > > Index: lang/gcc48/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- lang/gcc48/Makefile (revision 482165) > > +++ lang/gcc48/Makefile (working copy) > > @@ -33,6 +33,7 @@ > > SUFFIX=3D ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/} > > USES=3D compiler cpe gmake iconv libtool makeinfo perl5 tar:bzip2 > > USE_BINUTILS=3D yes > > +BINARY_ALIAS=3D strip=3D${LOCALBASE}/bin/strip > Shouldn't USE_BINUTILS automatically prefer all binaries from there to be > used, instead of the base system variants ? >=20 Strip is not in the list of binaries to override, probably something to fix. Plus it expects the build system to respect the "classic" env var, which im= ho should be replaced by BINARY_ALIAS when possible Best regards, Bapt --5mnps4f4lfeoxi7i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlvFuuwACgkQY4mL3PG3 PlrmaA//XM6qWOpITz8r7S7Z97gRZTzelPvbw3z3/E3H69iU63lD4rMV/Danmv9n K97tTv0lqU2yzfE9sS9Dx94ILAyH8/QTW4EQumDRVXPXR3wGyeGOAvVpdPpfOxAs AEhwKsSTPflPAssk1Q+/CvNY64feoqWSzjGaJedWC2Ucv8yqGSYQPks3n0r3b5WV MWsfKe2EN4S6RI5M0v4xdyFPq3BqdlDH8Vp0cUjFgvGDHXolf04RnvBBgZB/fkna pYbUgPIzH/zH1DO5v1PPYsg6Rox7RW8RHSXhhu/jPG8HTOamYP0yEeVUL7HJWjUN ubvYMyqkiysZP4wBzy6cqKmuYUSdjfcmnZgYvt1z4n32ski40j3YkcEyuM5sJjdm qkBb0boegmEaDgquqE6uQcqtxLudHT5zbvXf1Ur1k2AgFyfIBOx1bNdISOZ/XWH0 DMhn7sbQxsc3dilhjeGbacDMRgH7zq+5af7E3ntkcyCD0us5/PdeTpIB+hpctJCQ yQLrp1991SmEQdFjg+8wwl0br34EFRx6BeMEk/gKYjmzUUCLgzxZJahBtSyJV05e 07EL5BHKNg/ouqV7NjBPHvUWU+E1t1nPeyeYruAQt6KM1V9SWS9Bu5D1FTDsF18j neRvpnuehMhkkjkC4mr5TXkJ3EZuFJgC/FqT5WtGvybL3DyDiPs= =LU1Y -----END PGP SIGNATURE----- --5mnps4f4lfeoxi7i--