From owner-freebsd-toolchain@freebsd.org Sun May 20 01:14:16 2018 Return-Path: Delivered-To: freebsd-toolchain@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 06C51EEB61F for ; Sun, 20 May 2018 01:14:16 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E62B879FE for ; Sun, 20 May 2018 01:14:15 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: 0LDMqaMVM1kb91JZYP7aNoxTUcue6QflRcLL_9Cgpvi6gVi5jleJGvTK7yxo4ob 5dHppIo97K8fwR1jSzY2y0w3cSbnXUnEng6_Y6.PgODk0VFfnwV1Ba4t7D76Psd0ZrNaajbzY_kn EZKwYlOYw9UHh0LAe2Ja9XUKI6ipGpUcW1MKFGn7nbStSHyNX1F.lPvZHICuC3HwomfRKq96oonw Jd6NZnNu6aknC2s1XUo0Kmp9VD0J3O.phBUnslsboQl1GxgrvBAwK1IsRvxhqgYN0pYDjLYAHuGT XSQ0uEwkNSFR2tvBvmhwfSoU.kMvGSLpImlhuhg9aRRYgp32dhVoZq0W8dnB0iT70w2c1u7m2SIg e6TfExdPAtSzVuuWyj7NOC76KNh_mdZqZ167p_tDZUvrnI3Q3swzixB9FLmVw4eA6UTX7QI_z8D5 __QQtyKZa81N3fJMOagVi1hH_8xD06kAVKBhXplTVATUt..jtSMnCar64HWz3ejEaMVuZTFzrtM5 BsPStZNzFA8krUIdbo8h.l4kMK6RiZTJYmxYv1HMBwXW535HcHW_y9E1AePP2AM7VdrAkQ2LG0ai h3qYUIg2V4y8.Vh1DOvd4yoEU8KWFB5UfecpAtBZmdATaxrHbB6ssO88aBZz4kab3xt5Ui101G02 E Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Sun, 20 May 2018 01:14:13 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp415.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 11462b4e7e133d60b3119aedc4c2db36; Sun, 20 May 2018 01:04:01 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: Still true at -r333575 : head -r320458 (e.g.) amd64 -> powerpc64 cross build's install32 during installworld: /usr/src/share/mk/bsd.linker.mk tried to use "head" when PATH provided no access (head is missing) From: Mark Millard In-Reply-To: <9086ff35-009b-c965-4970-3f8ad4fe6e6b@FreeBSD.org> Date: Sat, 19 May 2018 18:04:00 -0700 Cc: FreeBSD Toolchain , FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <67D92B43-5124-4EDF-BA26-26CE8B082FE7@yahoo.com> References: <0E42D991-D350-4DC1-A683-CEA506167520@dsl-only.net> <8F22B659-90DE-42E5-B4C6-75C9B9626462@dsl-only.net> <8EB87EA5-0ED6-4F46-80FC-1A0DB29CF7D6@dsl-only.net> <84A73CB0-CBCB-4EE4-A4B7-B8B2F25EECB5@yahoo.com> <9086ff35-009b-c965-4970-3f8ad4fe6e6b@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 01:14:16 -0000 On 2018-May-14, at 5:04 PM, Bryan Drewery = wrote: > On 5/13/2018 1:13 AM, Mark Millard wrote: >> Retrying the amd64 -> powerpc64 cross build via a powerpc64-gcc >> this time, combined with WITH_LIB32=3D , got: "sh: head: not found" = and its >> later consequences, like before for installworld (to a directory on = the >> amd64 host context). This is from the /usr/src/share/mk/bsd.linker.mk = line >> that results in: >>=20 >> (/usr/local/powerpc64-freebsd/bin/ld --version || echo none) | head = -n 1 >>=20 >> but head is not available by default at the time (lib32 context). (I = make >> head be available via using LOCAL_ITOOLS=3Dhead in order to work = around the >> issue.) >>=20 >> An example of the messages (without having LOCAL_ITOOLS=3Dhead) is: >>=20 >> --- _installlinks --- >> install -l s ../../libexec/ld-elf32.so.1 = /usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld/usr/libexec/ld-elf32.so.1 >> cd /usr/src/usr.bin/ldd; PROG=3Dldd32 . . . >> . . . >> . . . MAKEOBJDIRPREFIX=3D MK_MAN=3Dno MK_HTML=3Dno MK_TOOLCHAIN=3Dno = -DLIBRARIES_ONLY install >> sh: head: not found >> make[4]: "/usr/src/share/mk/bsd.linker.mk" line 47: warning: = "(/usr/local/powerpc64-unknown-freebsd12.0/bin/ld --version || echo = none) | head -n 1" returned non-zero status >> make[4]: "/usr/src/share/mk/bsd.linker.mk" line 58: warning: Unknown = linker from XLD=3D/usr/local/powerpc64-unknown-freebsd12.0/bin/ld: , = defaulting to bfd >>=20 >>=20 >> The two "make[4]" lines are consequences of the prior "sh: head: not = found" >> issue that leaded to a "non-zero status" independent of the prior = "--version" >> and "echo none" material. It then leads to assuming bfd. >>=20 >> Using LOCAL_ITOOLS=3Dhead makes head available and so then the status = value >> check works. >>=20 >=20 > Sure but this command being executed never should be executing during > install; Adding 'head' as a tool isn't the right fix. >=20 > I have never been able to recreate the problem here. I have an idea = I'll > test. >=20 May be the following will help. It shows a clear difference between the ${XLD} and ${LD} text that is used in: .if ${ld} =3D=3D "LD" || (${ld} =3D=3D "XLD" && ${XLD} !=3D ${LD}) when ${LD} =3D=3D "XLD" in my context. My src config that is involved has (extracted): TO_TYPE=3Dpowerpc64 VERSION_CONTEXT=3D12.0 CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc X_COMPILER_TYPE=3Dgcc = CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-unknown-freebsd${VERSI= ON_CONTEXT}/bin/ .if ${.MAKE.LEVEL} =3D=3D 0 XLD=3D/usr/local/${TOOLS_TO_TYPE}-unknown-freebsd${VERSION_CONTEXT}/bin/ld= .export XLD .endif and is used via: SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc64-xtoolchain-gcc.amd64-= host" Given that, by adding a: .warning "ld=3D${ld} XLD=3D${XLD} LD=3D${LD} = LINKER_TYPE=3D${${X_}LINKER_TYPE} LINKER_VERSION=3D${${X_}LINKER_VERSION}"= line just before before the /usr/src/share/mk/bsd.linker.mk line: _ld_version!=3D (${${ld}} --version || echo none) | head -n 1 that is being (incorrectly) executed and not finding head the extra .warning reported: make[4]: "/usr/src/share/mk/bsd.linker.mk" line 47: warning: "ld=3DXLD = XLD=3D/usr/local/powerpc64-unknown-freebsd12.0/bin/ld = LD=3D/usr/local/powerpc64-unknown-freebsd12.0/bin/ld -m elf32ppc_fbsd = LINKER_TYPE=3D LINKER_VERSION=3D" Note that the LD=3D part has the text: -m elf32ppc_fbsd in it where my explicit XLD assignment does not. Is my src config handling of XLD non-supported in some way? Did I step outside the intended coverage? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)