From owner-freebsd-toolchain@freebsd.org Tue Jul 4 14:23:56 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E484D92F21 for ; Tue, 4 Jul 2017 14:23:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (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 19D9B7C99B for ; Tue, 4 Jul 2017 14:23:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x236.google.com with SMTP id r36so72359753ioi.1 for ; Tue, 04 Jul 2017 07:23:56 -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; bh=A2tFDkHVz9hqTV9157GAO7iGSxtlseDzG3NCzcPVbzc=; b=LcZVpNm/qV+FdQP6D3S0ahhIEvRonNf8Ah6M51XIJ2UFCH0ho2IabdEoLW1sjRAUjD wuNB3eMEQEeekbKhUYeiUDs0zCZl4LhPrYoMHO5xsVLbNWsUMYDc/00Nu6eh3QSDO545 dciJ86+N5RQdAHWB3iFWdMFP6DjcfgSm0KUZxFAsOJZMQ7+cDDkDbP6oN6HB2lXQU0Do pDsmpBnYly0SO+Z9RsRPVXOy6dIoa5BgISQhVi/wEhxn2xSjmuQFPNg81r7MtdbKyFU+ 98BtKu072BKUBAImjuvQM3dQWLAAnTeOz0F0xVSVlRSRzOJ6FifpHo0UBG/Ve25d5NvJ KBtA== 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; bh=A2tFDkHVz9hqTV9157GAO7iGSxtlseDzG3NCzcPVbzc=; b=coQvzjDddgmv5FODuZxr0A1vtgpPoy71lyTegHb68pJSN0HpxBChyC31keBU8sx+bW XRPDu4MN6C+zlGJU/z67B1+G+jWigRtj4TjO08fcngv2AJem2YsgHfigLAJftlfg7hn+ 0pCkLE/We4Yem5MAv0lBlU825PPtus9Sq3dKRk+JCmMCb7so/SXdGPsUsy94EVr+czl9 R9cJEZa1FBHdt4VaF/mHJmdUu6cuxyfSXW96bFJVndY89G0N0ZOwty+P34LVa9CjDbW3 llyfuhM1DPSMeXPcH6XVH6t/SI4Elbn1GK6dM0fjnnOEBOEsKNBJfQyrGcVc2PZoMp9R JzfA== X-Gm-Message-State: AIVw112J6CFq8TQKI+L4LrAVI3NVv+yEZUI622Zl/v4xaxlPxgYa5mve iuYcTB202RaRHD7/XrvBKmmPsGu7pLcc X-Received: by 10.107.178.65 with SMTP id b62mr9768918iof.113.1499178234979; Tue, 04 Jul 2017 07:23:54 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.10.85 with HTTP; Tue, 4 Jul 2017 07:23:34 -0700 (PDT) In-Reply-To: References: From: Ed Maste Date: Tue, 4 Jul 2017 10:23:34 -0400 X-Google-Sender-Auth: zO4nTFkrPmq5NxZxkyOx0ZToJIc Message-ID: Subject: Re: June 2017 update on using LLVM's lld linker in the FreeBSD base system To: "freebsd-toolchain@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 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, 04 Jul 2017 14:23:56 -0000 On 12 June 2017 at 17:21, Ed Maste wrote: > Another update on using LLD as the FreeBSD base system linker: Since "amd64" and "arm64" look similar, let me clarify one point: arm64 -- 64-bit ARM -- is built with, and has as /usr/bin/ld, LLD 4.0.0. This is true in HEAD and in stable/11 (and hence the upcoming 11.1) amd64 -- 64-bit x86 -- is built with, and has as /usr/bin/ld, GNU BFD ld 2.17.50. LLD is installed as ld.lld; adding -fuse-ld=lld to CFLAGS can be used to test linking various software with LLD. Also, the amd64 linker will not change in stable/11. > Then the ports infrastructure > can automatically use ld.bfd, until the issue is addressed in the > individual port or in LLD. It will be something like > "USES=linker:not_lld" or "LLD_UNSAFE=yes" or so. Still waiting on this; once it is ready I expect to switch amd64 to LLD. > Outstanding issues with i386 and 32-bit arm prevent us from turning it > on for those architectures right now. The LLVM tracking bug in > http://llvm.org/pr23214 depends on those individual issues; i386 > should be relatively straightforward, while arm needs more work. i386 still needs investigation, but progress has been made on 32-bit arm. andrew@ booted an lld-linked arm kernel/userland to the login prompt, with a few workarounds. Note that this is specifically for armv7. LLD does not currently support earlier ARM architectures. TARGET_ARCH=armv7 support is in discussion/planning, and for now I assume that we'd initially switch only it to LLD. TARGET_ARCH=arm and TARGET_ARCH=armv6 will continue to use ld.bfd. It appears we are on a credible path to enable LLD by default in 12.0 for the tier-1 and almost tier-1 architectures of i386, amd64, armv7, arm64.