From owner-svn-src-head@freebsd.org Fri Jun 2 00:51:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BA45BD33C8; Fri, 2 Jun 2017 00:51:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34D207509F; Fri, 2 Jun 2017 00:51:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 60481BE09; Fri, 2 Jun 2017 00:51:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 7B75E7657; Fri, 2 Jun 2017 00:51:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id yo2EVzHmM98z; Fri, 2 Jun 2017 00:51:15 +0000 (UTC) Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2DCF7764F From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Thu, 1 Jun 2017 17:51:14 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:51:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj Content-Type: multipart/mixed; boundary="9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar Message-ID: Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> In-Reply-To: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> --9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/1/2017 5:18 PM, Bryan Drewery wrote: > On 5/23/2017 12:00 PM, O. Hartmann wrote: >> Am Tue, 23 May 2017 12:52:35 -0500 >> Pedro Giffuni schrieb: >> >>> On 23/05/2017 12:12, O. Hartmann wrote: >>>> Am Tue, 23 May 2017 16:38:10 +0000 (UTC) >>>> "Pedro F. Giffuni" schrieb: >>>> =20 >>>>> Author: pfg >>>>> Date: Tue May 23 16:38:10 2017 >>>>> New Revision: 318750 >>>>> URL: https://svnweb.freebsd.org/changeset/base/318750 >>>>> >>>>> Log: >>>>> Bring some rough support for FreeBSD S/390 to the GNU toolchain.= >>>>> =20 >>>>> This is no-op and only for reference: the S/390 port seems to be= elusive >>>>> in the BSDs so it is convenient to keep some trace from past eff= orts. >>>>> It is likely newer attempts will focus on a newer toolchain usin= g clang >>>>> instead. >>>>> =20 >>>>> Obtained from: Perforce depot/projects/s390 >>>>> >>>>> Added: >>>>> head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (conten= ts, props changed) >>>>> head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents= , props changed) >>>>> head/contrib/gcc/config/s390/freebsd.h >>>>> - copied, changed from r318546, head/contrib/gcc/config/s390/= linux.h >>>>> Modified: >>>>> head/contrib/binutils/bfd/config.bfd >>>>> head/contrib/binutils/ld/configure.tgt >>>>> head/contrib/gcc/config.gcc =20 >>> ... >>>>> Buildworld fails on r318751 with a "Segmentation fault" error as sh= own below: >>>>> >>>>> Building /usr/obj/usr/src/lib/libkiconv/_libinstall >>>>> --- lib/libmd__L --- >>>>> --- skein_block_asm.o --- >>>>> Segmentation fault >>>>> *** [skein_block_asm.o] Error code 139 >>>>> >>>>> make[4]: stopped in /usr/src/lib/libmd >>>>> .ERROR_TARGET=3D'skein_block_asm.o' >>>>> .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.me= ta' >>>>> .MAKE.LEVEL=3D'4' >>>>> MAKEFILE=3D'' >>>>> >>>>> >>>>> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: = Tue May 23 >>>>> 18:52:59 CEST 2017 amd64 =20 >>> >>> It shouldn't be related to this change: >>> >>> 1) This only affects s390 configuration which is never activated >>> 2) I did run a tinderbox build to make sure nothing was affected (the= =20 >>> only thing failing was an unrelated powerpc warning that was fixed). >>> >>> Pedro. >> >> Hello, >> >> the problem could be resolved by deleting the /usr/obj folder and star= t a clean build >> again. >> >=20 > I think this is fallout from ino64 combined with META_MODE. META_MODE > assumes that host tools will be ABI-compatible and generally does not > [force] rebuild them very often. So the act of upgrading to ino64 host= > and then doing another build, your ld and various other host tools will= > still be running pre-ino64 binaries via COMPAT_FREEBSD11. I think the > bug in this system is that it is possible for some of these tools to ge= t > mixed-ABI objects linked together resulting in differing ideas of what > 'struct stat' is for example. This could be possible since META_MODE > won't force rebuild all objects for a directory/tool but it may rebuild= > 1 object for some reason or just relink the resulting binary. >=20 > Here's an example of what I'm talking about with the host ld object fil= es: >=20 >> -rwxr-xr-x 1 root wheel 1857312 Jun 1 12:59 ld.bfd* =20 >> -rwxr-xr-x 1 root wheel 931304 Jun 1 12:59 ld.bfd.debug* =20 >> -rw-r--r-- 1 root wheel 978 Jun 1 12:59 ld.bfd.debug.meta =20 >> -rwxr-xr-x 1 root wheel 2600311 Jun 1 12:59 ld.bfd.full* =20 >> -rw-r--r-- 1 root wheel 3988 Jun 1 12:59 ld.bfd.full.meta =20 >> -rw-r--r-- 1 root wheel 999 Jun 1 12:59 ld.bfd.meta =20 >> -rw-r--r-- 1 root wheel 154400 Apr 18 16:12 ldcref.o =20 >> -rw-r--r-- 1 root wheel 4553 Apr 18 16:12 ldcref.o.meta =20 >> -rw-r--r-- 1 root wheel 137088 May 11 14:14 ldctor.o =20 >> -rw-r--r-- 1 root wheel 4348 May 11 14:14 ldctor.o.meta =20 >> -rw-r--r-- 1 root wheel 205 Oct 11 2016 ldemul-list.h =20 >> -rw-r--r-- 1 root wheel 814 Oct 11 2016 ldemul-list.h.meta =20 >> -rw-r--r-- 1 root wheel 144088 Oct 13 2016 ldemul.o =20 >> -rw-r--r-- 1 root wheel 4374 Oct 13 2016 ldemul.o.meta =20 >=20 > The object files predate ino64 but the linked binaries do not. I did > not dig into these object files more but I suspect somewhere there are > mixed-ABI object files hitting this bug or that just linking pre-ino64 > objects may cause a problem. I don't think linking would be a problem > though. This commit did cause a mixed-ABI object issue that I predicted. Built before, updated, built again and targets.o is rebuilt. > Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targmatch.h= > Skipping meta for .depend: no commands > Skipping meta for afterdepend: .PHONY > Skipping meta for depend: .PHONY > Skipping meta for objwarn: .PHONY > Skipping meta for beforebuild: .PHONY > Skipping meta for .WAIT_1: .PHONY > /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o.meta: 81: = file '/usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/./targmatch.h' i= s newer than the target... > Building /usr/obj/root/svn/base/gnu/usr.bin/binutils/libbfd/targets.o targets.o is the only relevant object file I could find in the broken objtree given to me that was post-ino64. It doesn't directly use any of the changes structs that I can see, but the mixed-ABI proof is enough for me to put the understanding of this to rest. In case I wasn't clear, this commit is perfectly fine. It just triggered a META_MODE bug. >=20 > Anyway the fix for this would be to either 'make cleanworld' after > upgrading to ino64, use -DNO_META_IGNORE_HOST for the first build after= , > or wait for my fix. I will commit a fix to force rebuild host tools > through known major ABI changes to avoid this problem. >=20 > For discussion of why META_MODE tries to not rebuild host tools see > r301467. The gist is that a simple > 'buildworld->installworld->buildworld' causes everything to rebuild due= > to changed host file timestamps. Really it would be better if > filemon/META_MODE used file content hashing like ccache did. Then > timestamps wouldn't cause such a problem here. >=20 --=20 Regards, Bryan Drewery --9MCl0U2rDHlPTguCD2TQFdJJLllQsN8Nw-- --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZMLaCAAoJEDXXcbtuRpfPY8IIAMNo7636uQaGIP5L3hh/8OcV 4wYK4JqED4Syn+H21q5yHx1oJ3uu3L2wglezfL6B7d+2/KgvwvNa8QOz8S63duOa De+QhT5KfevK8kPqou6bPwC2jFtv8EUW4nojcS6mO4XOwW3zJq0hD+0hi4QG2+OQ 1t41qMSzapYCZjKg0wEY+Yt9Fza1afZuXyH6S5gyMDsL3mtatA13CO3JCdwpQh3+ iMkpqJlSOvI27Z5FQHhyeHFN0/29k5eGaEF3CCRy/FXXyMUvb5U1abz9b598ghu8 yapJTWjmldLfS3TWWhNHp3mXL0Rm7Ff6V2Er8NLpu10EMED33H4rE25aO4N0ZAQ= =H2Pf -----END PGP SIGNATURE----- --DUJJ56CjpPj27HEroA56SwHNsIRO6aDHj--