From owner-freebsd-toolchain@freebsd.org Mon Jun 12 21:21:33 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 2D615C7892B for ; Mon, 12 Jun 2017 21:21:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (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 EC4AA80034 for ; Mon, 12 Jun 2017 21:21:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x233.google.com with SMTP id i7so62524608ioe.1 for ; Mon, 12 Jun 2017 14:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=2ukRaCOIssJpY2H61XJOfeQJjtO6nGrCzKDlYRVePlk=; b=YxLz+jyb8kk4H/HQ7F1wb097IVMAbozAhZpgZs0tMiEFUTVHy49NcFOY5qDJ9h2Wr1 82jXrZRHM4yeLFOrb3LT/4qFQpN07/6hk6q8SyMMz8SRaPqbtE0uWXAWUuON1Vv0JP8h hQ+YLhWnK5BEx9S8SERyUilVTAmanhmx6O1ZwBD5cpuPcwPvZDsEuJm7CDjo+bGIO0Kf P5i+UW0Hyls38lsK5IXf0aQZ8Z13UjdcmS5xOyIVe5dQ+GyDVa7qg4jORNL06UvmPSGe m7mDonVnPKgHFkd2tAi8XIZG3NBO1jR8EKEc4Qr6P5CKwcyofrmvdGnX/VqfACFZFiNP AbtA== 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:from:date:message-id:subject :to; bh=2ukRaCOIssJpY2H61XJOfeQJjtO6nGrCzKDlYRVePlk=; b=eDT9JHebozbXvTooGEF6ziqZtq8FgvXMI/VoBSIFr7gGpHeZxu00iDJwIpljhxGXPC jjl3appV9kzPKDB+nmXa5A8VGo/zurYjwUbtq9aXlrNRiO8QfXJAeV1iQIhYCY7SXmzv MhR7MMmBYMusHecZtLfdxZtCiZnRm5uaUeUuVFUzIeGfxPSXI8lVga4udTB99jOTnFJN rl/eny9s3RItDb1linIGZdu+h5IcbGBBO5Wi+WB8fKaTvw1sLDwdB5hn4FkkHaDzzz/N hcGSk4VR2IAksUc6x2aSuDVumY7+Cfr5gLEfWq2C1H2ZjzlZdIp8tNrO11qCaG/u/vMz rkFg== X-Gm-Message-State: AKS2vOyghQ+JlE0CzTCOVhNZ8ZNDidY1R/VdfQ5QMuiKlVRs5U3q2L6o Ir1Ca4i337BRbP4Yz2ksZjMwEA2Xn6MfzMw= X-Received: by 10.107.167.199 with SMTP id q190mr1006751ioe.110.1497302492020; Mon, 12 Jun 2017 14:21:32 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.10.86 with HTTP; Mon, 12 Jun 2017 14:21:11 -0700 (PDT) From: Ed Maste Date: Mon, 12 Jun 2017 17:21:11 -0400 X-Google-Sender-Auth: unuqWj6mFJzZU9YKMWoLnix2q78 Message-ID: Subject: 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: Mon, 12 Jun 2017 21:21:33 -0000 Another update on using LLD as the FreeBSD base system linker: > We now have LLD 4.0.0 in the tree and it can build all of > FreeBSD/amd64 kernel and world, and most of ports. LLD 4.0.0 is in HEAD and stable/11, and WITH_LLD_IS_LD and WITH_LLD_BOOTSTRAP are enabled by default for arm64 on both branches. There are a few post-4.0.0 bugfixes in LLD that we need to import into HEAD in short order and MFC for the 11.1 release. It is possible to build both the amd64 and arm64 world + kernel with WITH_LLD_IS_LLD and WITH_LLD_BOOTSTRAP. My daily driver desktop and laptop are using LLD as /usr/bin/ld. >> 6. Request ports exp-runs and issue a call for testing with 3rd party >> software. Fix issues found during this process. > > This is in progress now, in PR 214864. There are currently 270 failing > ports and 963 skipped. The top ten failing ports (by # skipped) are > responsible for 808 of the skipped; addressing those should allow us > to build nearly 98% of the ports collection with LLD. bapt@ and I discussed this at BSDCan and we intend to create a way to flag ports that don't build with LLD. 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. >> 7. Switch /usr/bin/ld to ld.lld by default in head for the Clang-using >> architectures. Add a WITHOUT_LLD_AS_LD knob to switch back to GNU ld. > > While there is still no timeline set for this, it is already done for > arm64 (where we have no in-tree GNU ld available), and it is close to > being feasible for amd64. Further investigation is needed on i386 and > 32-bit arm before moving forward here. Once the ports infrastructure is in place I plan to enable LLD as /usr/bin/ld by default on amd64. 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.