From owner-freebsd-toolchain@freebsd.org Tue Mar 27 06:20:26 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 63544F52718; Tue, 27 Mar 2018 06:20:26 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 E4FF47011A; Tue, 27 Mar 2018 06:20:25 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-io0-x229.google.com with SMTP id e79so26128554ioi.7; Mon, 26 Mar 2018 23:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nb7Jy7OgVHCe4frKAsG25iTI51e2alPw0lIjwtXa/jk=; b=tvoqwCmXcUmoHWM5y7ayCoCkrvbQWeB8X356po9GbTN7BXEStO2elfV1Ob+50xzmTy bzXQHDkVL43Y1xK4xs0E7saPrFQVDwdIGiT5c+ZFplEgPA2VezJ4glftBP6sHHxrL1M8 8WI3oq8bYXdpcxx6Uq2Medolcd/h2cKlBE+VcA4Tx+WM9IlwAyHPwjQcmzVZhaDAgl8Y 8CyGBXNj4FfpK9XGKgjXohWfWGnplaWQe3kTacJMUOUXs0A1PYam9yVEUw7jLnMQN1A1 vfMgM1TN2ctLp/4SxuPwT5nn0SoOViwXFEM8hFT9i2eBknf0nbpw2yWNhMFZOOknGn0U baog== 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=nb7Jy7OgVHCe4frKAsG25iTI51e2alPw0lIjwtXa/jk=; b=Y+H8o0vsjoSaBGzEZTBEV52oU2dik5CWTK4fqG9GYTDdzq36PBzRJELi4Fd3O+7r0N wSWYchTRTJzRJwihI+0apizVsuaAAvy9U3miP67mWUphqEAxURfUyOEq9oV4YQln+SC+ Z/liBGbCvK6q1b6t/SDiw3kJ25kV5nbqMFxPg6rtGPgp6QSb4hYOeqqTnFzxkcWc9Hoc 1JihfWGedz9WePF/Xu9v127JFNObh9BMp+HHdwc5hA1C5I7HJ5QTjybgCbKcZ1IuLdg1 TjIf+YuF5K63Ao5bBEll2OOg8q2otil8vezRtY/wCQSdWy3XQsgEXUARzX3FZw/d/gqj eQ+A== X-Gm-Message-State: AElRT7EKSpV25rSWeiNKfqBubfuh5Q+NFM/wjnoUGFRw1JcmDdPBnIiR Yh+uEjfiUnvLnXUEXRcXzS5e4FdoRYnsdnjDnMs= X-Google-Smtp-Source: AG47ELtCh6zZpL9YsPRhAdd3ahVB97M7xvU3uGlPI9yuWneQINPvhp9trN+2erWZihzL73vFYfaKA8FwhHJTRLkDPfQ= X-Received: by 10.107.59.8 with SMTP id i8mr42476822ioa.110.1522131625220; Mon, 26 Mar 2018 23:20:25 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.184.135 with HTTP; Mon, 26 Mar 2018 23:20:24 -0700 (PDT) In-Reply-To: References: From: Antoine Brodin Date: Tue, 27 Mar 2018 08:20:24 +0200 X-Google-Sender-Auth: GeK0p40amV14kuHzEkoJhRy3g18 Message-ID: Subject: Re: Heads-up: linker (lld) changes for amd64 coming soon To: Ed Maste Cc: FreeBSD Current , "freebsd-toolchain@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 06:20:26 -0000 On Tue, Mar 27, 2018 at 4:14 AM, Ed Maste wrote: > Some changes related to the amd64 linker are nearly ready to be > committed (within a week or three), so I'm sending this notice to > request any final comments or concerns before these changes are made. > > 1. Kostik (kib@) has a patch to start using kernel ifunc, with the > first use being Supervisor Mode Access Prevention (SMAP) on amd64. > This relies on linker support that is available in the in-tree lld and > in contemporary binutils ld.bfd from ports, but not in the in-tree > ld.bfd 2.17.50. > > Right now we use lld as the default bootstrap linker for amd64 in > -CURRENT -- that is, the kernel, and userland libraries and binaries > are linked with lld. To revert to ld.bfd for amd64 the build-time knob > WITHOUT_LLD_BOOTSTRAP=yes can currently be added to src.conf. When the > ifunc changes get committed WITHOUT_LLD_BOOTSTRAP=yes will not work > for amd64 kernels (and will be added to BROKEN_OPTIONS). > > 2. WITH_LLD_IS_LD controls whether /usr/bin/ld is ld.bfd or ld.lld, > and thus the linker used for linking ports. I plan to switch this to > default on. > > Most ports build just fine when lld is the system linker, but a few > encounter trouble: some of the ports rely on options not supported by > lld, rely on specific quirks of ld.bfd's implementation, or have a > buggy linker invocation that is silently ignored by ld.bfd. > > The majority of such ports have now been adapted to work with lld or > configured to use ld.bfd as the linker, but there are a small number > of failing ports that do not provide a way to use other than the > default system linker /usr/bin/ld. The outstanding issues can be found > in the ports exp-run for lld as /usr/bin/ld, PR214864. > > Please follow up if you have any concerns or comments about these > upcoming changes. Hi, I have no concerns about 1. About 2., I am concerned that changes breaking a large number of ports are committed without portmgr@ approval. If WITH_LLD_IS_LD is committed as is on amd64, packages for head won't be published as it doesn't meet our current criteria for publication. Antoine