From owner-freebsd-arch@freebsd.org Wed May 16 15:11:15 2018 Return-Path: Delivered-To: freebsd-arch@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 DA8F1EE7B35 for ; Wed, 16 May 2018 15:11:15 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F34DC6CCA1; Wed, 16 May 2018 15:11:14 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4GFBCEo001109; Wed, 16 May 2018 08:11:12 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4GFBCTQ001108; Wed, 16 May 2018 08:11:12 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201805161511.w4GFBCTQ001108@pdx.rh.CN85.dnsmgr.net> Subject: Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support In-Reply-To: To: Ed Maste Date: Wed, 16 May 2018 08:11:12 -0700 (PDT) CC: Hans Petter Selasky , Emeric POUPON , Oliver Pinter , freebsd-arch X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2018 15:11:16 -0000 > On 16 May 2018 at 09:35, Rodney W. Grimes > wrote: > >> > >> LD=ld.lld make > >> > >> is the magic here. The kernel needs a new linker to properly link in the > >> ifunc, and that's not our ancient ld. lld does it, as does the latter-day > >> binutils. > > > > Since this now seems to be a mandatory thing to get a kernel built > > can it please be set in the Makefile that is needing it? > > It's already handled by the Makefile that needs it when using the > normal build process - i.e., "make buildworld buildkernel" (or > toolchain or kernel-toolchain followed by buildkernel). > > The failure arises when building a kernel the "old" way, using config > and then and make in the kernel directory. This inherently uses the > host's linker (/usr/bin/ld), which is too old to link the kernel. We > can't just add LD=ld.lld to the kernel's Makefile(s), because it would > break external toolchain and other cases where users use a specific > linker. I hope to introduce a KERNEL_LD Make variable that controls > the linker used for the kernel link, but it's more involved than a one > or two line change for the same reason that we can't just set > LD=ld.lld. > > ld.lld will start being installed as /usr/bin/ld once these two issues > are resolved: ... In the meantime what about reverting the ifunc usage until this can be done? > > pr227968 [exp-run] Update lang/ghc to 8.4.2, devel/stack to 1.7.1, and > all the */hs-* ports > pr214864 [exp-run] test build with lld as /usr/bin/ld > > The exp-run for the first is complete and I believe we are now just > waiting on the change to be committed. As soon as that happens I will > ask for another exp-run for the second PR, and will commit the change > to install lld by default as soon as it completes (assuming > successfully). > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > -- Rod Grimes rgrimes@freebsd.org