From owner-freebsd-toolchain@freebsd.org Thu Aug 16 14:49:08 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 C8D9310699EA for ; Thu, 16 Aug 2018 14:49:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-13.consmr.mail.bf2.yahoo.com (sonic309-13.consmr.mail.bf2.yahoo.com [74.6.129.123]) (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 65B4C85F58 for ; Thu, 16 Aug 2018 14:49:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: e0Lw3TQVM1mq0flWmQafWnj.JFCR9FLx7GvDkadCoREfJU_8NCqWD8K0ZFXzqCg HeiLnJ6Kgwu3IMcUPa5uzZRxeQMG8n9f22iZh8X5PxX6NBT6QuiCyoVYATtdWzSdbl57CaV4oOk0 LDAGSLCx8qgskPgPvio3EoFrdUlLjEGRR7rKBEO9Ys3REs3sg00fP23UiDndsBx_RBH.Ef7GZItF 9NDEUSnBu_PrgLz6_VN_k.7QoLEWTg.7SWP3.OOXEAnDzs2Ac5aYGFmC8QkpaAAcwP1katgV38p_ e.E9qQjzdQBVRixObY0h0u6CpQAMHnrxKvuTNFSc7BP_A.sQUvDKMf9IgdFQa3y2rcTcHyPOmGiq 43_cUBNtw1D2E1ItGgNNfU_XK3QfkMJ7wnFXBn_N0FjBg3t.x91096dUDd4t_NYNoKZ93JTLupUM n6PJqd9Fs7DBkoFQgSD72vk0kZED1ZkGKAS8ajjEI21FIEK7S9Vbo8iQ71jD08pmD3fkg8sV.ltN 3x5r7WJGYJIaYkKYwCaUXwytzIALZd81BJ.fvwAh_ZWau9D8vg.WsEeR4LIM1XF7M.QAZ7Xqmv9Q 1ALu91HHHwDxidvit6r6csZNQo2DANxrjyz5ieBpdjdKy6uktiU1MrgNcMq7YToaAdtbQbf.XVMP rajy91bpH6HOoQ8vzqBBwm_nFrW3J47n.6NR15zIgpIDbfukReZA2bjQaDo17ueQjsCcNgEhi0fz CJF3Y4ZYRVGzv6FvWVgYLUXUURcI0dZpMRQrj2OFGGlQefMgyrc56h7Edi.bwB5hFwq2OQIqUzpc DHYYRyyDKAUtcjsWmtE9mPmU0_1pVqmqq0IYmcPBX2ZvKdEUNCTudj2D.seRUlkexQoKJeRLlxRV TuJtWuBsrro2VPwZILlYmvN2WBIUv6y7_DmidDPZu1gc7SN.2iHDgFIRM9HH3G2t2XQSLS0Vp2IL w0ZHJVfTB3EKwgnb_PiT5cxTR2YPIrYyaMHl1KDXfLnwJbVUJaQtdf.SL_.WAAp_1Xxjf_4JfjR1 6n5MFNvQ3aQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.bf2.yahoo.com with HTTP; Thu, 16 Aug 2018 14:49:07 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp431.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 008a48e9f24ba21288aac648e8cfd51e; Thu, 16 Aug 2018 14:49:06 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Broken arm support in clang now? From: Mark Millard In-Reply-To: Date: Thu, 16 Aug 2018 07:49:04 -0700 Cc: Ed Maste , "freebsd-toolchain@FreeBSD.org" , Dimitry Andric Content-Transfer-Encoding: quoted-printable Message-Id: References: <1880880F-9D9D-47E0-A7A4-5369A3770F89@FreeBSD.org> <8B467E75-A6D3-41A5-8EA1-4DDFE0E14CC5@nexustechnology.com> <230C1E7D-04DB-4E45-8A40-F6B2F5E557E9@yahoo.com> <86844298-1268-4F5E-A6CD-64CADC022FB9@yahoo.com> To: Warner Losh X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 14:49:09 -0000 > On 2018-Aug-16, at 7:16 AM, Warner Losh wrote: >=20 > On Thu, Aug 16, 2018 at 8:14 AM, Mark Millard = wrote: >> On 2018-Aug-16, at 6:38 AM, Ed Maste wrote: >>=20 >> > On 11 August 2018 at 20:45, Mark Millard via freebsd-toolchain >> > wrote: >> >>=20 >> >> Is the link command itself available? (The = .../sys/*/kernel.full.meta >> >> likely has it if it is still around.) >> >=20 >> > I tried a tinderbox build right now and saw the lld warnings from >> > linking zfs.ko. It appears to be fallout from the change to build >> > clang and lld only once for tinderbox, because we're invoking ld = from >> > the ${HOST_TARGET} path: >> >=20 >> > = /scratch/tmp/emaste/obj/scratch/tmp/emaste/freebsd/freebsd11-amd64/tmp/usr= /bin/ld >> > -m armelf_fbsd -Bshareable -znotext -d -warn-common --build-id=3Dsha1= >> > -o zfs.ko.full zfs.kld >> > = /scratch/tmp/emaste/obj/scratch/tmp/emaste/freebsd/freebsd11-amd64/tmp/usr= /bin/ld: >> > warning: lld uses extended branch encoding, no object with >> > architecture supporting feature detected. >> > = /scratch/tmp/emaste/obj/scratch/tmp/emaste/freebsd/freebsd11-amd64/tmp/usr= /bin/ld: >> > warning: lld may use movt/movw, no object with architecture = supporting >> > feature detected. >>=20 >> So ld.lld is not a valid cross linker for some arm variants? A >> architecture specific bootstrap one is needed? >>=20 >> Is this because armelf_fbsd is not specific enough to >> identify the accurate target emulation? Is it because >> the .o's are not sufficient for that identification? >>=20 >> Note: I got the questions from reading the output in: >>=20 >> # ld.lld=20 >> ld.lld: error: no input files >> ld.lld: error: target emulation unknown: -m or at least one .o file = required >>=20 >> So it appears that -m and/or .o's are used to identify targets. >> I'm not clear on the criteria when both are present. >>=20 >> (ld.lld does not take -target as an argument.) >>=20 > lld uses instructions and features introduced in armv7 unconditionally = to do its linking. The bug appears to be that clang invokes it = unconditionally in some cases. Ahh. Okay. 32-bit non-armv7+ cannot be fully llvm based. Intersting. But I took Ed M.'s text to be based on the .meta file where he listed: = /scratch/tmp/emaste/obj/scratch/tmp/emaste/freebsd/freebsd11-amd64/tmp/usr= /bin/ld -m armelf_fbsd -Bshareable -znotext -d -warn-common = --build-id=3Dsha1 -o zfs.ko.full zfs.kld The implication would be that ld was then directly invoked instead of via cc (clang). Looking at a armv7 build I happen to have around: # more = /usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-N= ODBG/modules/usr/src/sys/modules/zfs/zfs.ko.full.meta # Meta data file = /usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-N= ODBG/modules/usr/src/sys/modules/zfs/zfs.ko.full.meta CMD ld -m aarch64elf -Bshareable -znotext -d -warn-common = --build-id=3Dsha1 -o zfs.ko.full zfs.kld CWD = /usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-N= ODBG/modules/usr/src/sys/modules/zfs TARGET zfs.ko.full -- command output -- It looks like ld was directly invoked instead of being done via a cc command for my amd64 -> armv7 cross build example. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)