From nobody Wed May 18 00:33:52 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E353C1AEA566; Wed, 18 May 2022 00:33:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4L2v9z1XCMz3MF5; Wed, 18 May 2022 00:33:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 24I0XqpQ081323 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 18 May 2022 03:33:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 24I0XqpQ081323 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 24I0Xqlt081316; Wed, 18 May 2022 03:33:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 18 May 2022 03:33:52 +0300 From: Konstantin Belousov To: John Baldwin Cc: Charlie Li , Brooks Davis , Dimitry Andric , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 349cc55c9796 - main - Merge llvm-project main llvmorg-14-init-10186-gff7f2cfa959b Message-ID: References: <202205141148.24EBmkZd015765@gitrepo.freebsd.org> <4b61bdc6-fdc7-57df-e9b7-52543fd083be@freebsd.org> <20220516154825.GF15201@spindle.one-eyed-alien.net> <5e5281b2-a9d1-3751-b09a-c88d210f4f55@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e5281b2-a9d1-3751-b09a-c88d210f4f55@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4L2v9z1XCMz3MF5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.82 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_HAM_MEDIUM(-0.83)[-0.827]; NEURAL_HAM_SHORT(-0.99)[-0.994]; RCPT_COUNT_SEVEN(0.00)[7]; MLMMJ_DEST(0.00)[dev-commits-src-main,dev-commits-src-all]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-ThisMailContainsUnwantedMimeParts: N On Tue, May 17, 2022 at 10:56:14AM -0700, John Baldwin wrote: > On 5/16/22 8:09 PM, Charlie Li wrote: > > Brooks Davis wrote: > > > On Mon, May 16, 2022 at 10:47:49AM -0400, Charlie Li wrote: > > > > Dimitry Andric wrote: > > > > > This was also reported by another user, and it turned out they were > > > > > using WITHOUT_CROSS_COMPILER= in src.conf. If you also have that, try > > > > > removing it and rebuilding. > > > > > > > > > Yeah I eventually figured that part out. Worked around (first attempt) > > > > by building with devel/llvm14 CROSS_TOOLCHAIN, but resulted in certain > > > > kernel modules (zfs and a few more) with malformed relocations. > > > > Subsequent rebuild with the new world's toolchain corrected that. > > > > > > Does that mean we're missing patches in the port? Hopefully anything > > > this critical can be merged into LLVM 14.0.3. > > > > > Probably: > > > > May 15 22:34:08 current-builder kernel: ---<>--- > > May 15 22:34:08 current-builder kernel: Copyright (c) 1992-2022 The > > FreeBSD Project. > > May 15 22:34:08 current-builder kernel: Copyright (c) 1979, 1980, 1983, > > 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > May 15 22:34:08 current-builder kernel: The Regents of the > > University of California. All rights reserved. > > May 15 22:34:08 current-builder kernel: FreeBSD is a registered > > trademark of The FreeBSD Foundation. > > May 15 22:34:08 current-builder kernel: FreeBSD 14.0-CURRENT #121 > > main-n255657-48a1a6be196: Sun May 15 21:59:12 EDT 2022 > > May 15 22:34:08 current-builder kernel: > > root@current-builder:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 > > May 15 22:34:08 current-builder kernel: clang version 14.0.2 > > [...] > > May 15 22:34:08 current-builder kernel: kldload: unexpected relocation > > type 42, symbol index 8321 > > These are all type 42: > > #define R_X86_64_REX_GOTPCRELX 42 > > It's not a LLVM bug so much as it is probably missing support in the kernel and/or > loader for this type of relocation. kldxref might also need updating. > > I suspect due to a mismatch of old lld with new clang or some such that the old > lld failed to resolve these relocations to some other type or something weird like > that? I do think this is a toolchain bug, or at least new and undesired behavior. For practical purposes, R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX are same as R_X86_64_GOTPCREL64, I believe, but we do not expect GOT relocations in the .o object modules on amd64.