From owner-freebsd-arch@freebsd.org Wed May 16 19:46:45 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 DE3D1EAD802 for ; Wed, 16 May 2018 19:46:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B9F9786EA for ; Wed, 16 May 2018 19:46:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x243.google.com with SMTP id q72-v6so5132811itc.0 for ; Wed, 16 May 2018 12:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=vDwiEa3erh+qYx4dI7AnGCg4pY68zoZOolZDp7KTApQ=; b=C9UT5b2n4GknHrU7HBNS3BhWHizAwfC4m1jijFnH8H6GvoKhsX4j66oclox4n0ZFci UsDA7rFToXq6dKbAMGB+w9gHEBSNqELgWfZIrqu81oq48frFV/L3zJ8aDM6T6zzpiVgY X4DhGjhA/N2eoTLnUodCCi3i5a05k2EmSUGNFAGrRyYFAYON6/LPDN7PRitcj3rDhpxX taDa7vh8LKqvCcIJ52+ZMJ/zDefT4BEgkcyhh0JTI0u21dzjt4CG79hn+RQv59ybSEy4 Tl9gD6/pkn/Se4VeEG6nlGMZCZgwWm6F+ejb9oJbQ+CkYHXDaMCDKAad7YcsGtOfwYOS cjhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=vDwiEa3erh+qYx4dI7AnGCg4pY68zoZOolZDp7KTApQ=; b=JwnTM8prKJbwLw4JLpYfMakNhf5wU4/QlkMcokb9lo2gxPR65VQCisdB8buHH385EK xS0Nwo5n6XSf1XSCu6l9rNY9q4bFwTe7qL+iaf1UYzc1OGgVfyhH4dyEMASM4fRWGHEL eCKmQe88qYn1OGdQy0RXvWGnib3O/1xwflDkFQPv43a0xMKzjIrmJH4UyBf7CbmrEN8R OmQVXeSOuXQzthxdGrlX+p7bZas61PVPgzs6/EsMKohXEXQK8qVxNO7D/YEORLlUvoGx 437FFb8ck+PWdeDQN7O5AeWSwzESPsZ1g+Vpxs+QwbVg390d3YN9kZN8g0H3kSP7P+q5 jUfQ== X-Gm-Message-State: ALKqPwdf6ubjYItTJRgVmKmTcrSpfRkC+0mJwJZYNmp+bfTiXP9ZPpQg 0AsrJlhotDHgj3DCMHA1vjvbX2FRoCdzpv87AHDk2w== X-Google-Smtp-Source: AB8JxZq69fKcOBpVo3xYbcQWZJFbVnMve7K8VoYJF6VO8TifC2VxIjm5KjVia/T7tnHbCh1RtGBbJR39s23lQBo9Tew= X-Received: by 2002:a24:6ec1:: with SMTP id w184-v6mr2432428itc.57.1526500003673; Wed, 16 May 2018 12:46:43 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a649:0:0:0:0:0 with HTTP; Wed, 16 May 2018 12:46:43 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201805161511.w4GFBCTQ001108@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 16 May 2018 13:46:43 -0600 X-Google-Sender-Auth: E2AW-j2llxpOhUo5aHD043lhIuk Message-ID: Subject: Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support To: Oliver Pinter Cc: "Rodney W. Grimes" , Hans Petter Selasky , Emeric POUPON , Ed Maste , freebsd-arch Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 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 19:46:45 -0000 On Wed, May 16, 2018 at 1:34 PM, Oliver Pinter < oliver.pinter@hardenedbsd.org> wrote: > On 5/16/18, Rodney W. Grimes wrote: > >> 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? > > Nope. If somebody take trouble over compiling their kernel manually, > then at least > read the documentation, how to compile their system in the new way. > We talking about 12-CURRENT and not about 1X-STABLE branches.... IMHO, this is an acceptable breakage for -current. This is on the 'experts only' path and there's a note in UPDATING to cope. We don't intend to keep it that way forever, and the benefit of getting useful testing from a wider audience in this case, imho, out weights the minor inconvenience for the small minority of users that go old-school. Warner