From owner-svn-src-head@freebsd.org Fri Nov 25 19:38:10 2016 Return-Path: Delivered-To: svn-src-head@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 BC571C550C3; Fri, 25 Nov 2016 19:38:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 85BAE84D; Fri, 25 Nov 2016 19:38:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x231.google.com with SMTP id c21so133910209ioj.1; Fri, 25 Nov 2016 11:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=b2L5AOqYSMRZaO9qmZ3HyDJX1gwxbGhEBv9GgTksLkA=; b=vWuLiQlfxV+Z1hGEnJcVxAyh2yQakDfw5Jpd3bwQMpIgD92kR4bDUmc58H0+7KvR9o jbU2cDw4dAdUxhGiY4WgHWiFB7T/zYi+QObHMVUcjyw+ybS7tntoET7XN0YjXvWVSHkk igczGos74WF/73vCuG+tGrWo7xTwu85yz8GwCcbF5OkTWT4HbJBrv7CxIy7OLjrSQZ8U KTBmXR1i7svHUX6WbpR5yTdjPo5pBRaUdPaY/AVfQhbAEJkzLA9QMkMyWd3jKY5i80KO WBQza2pWF15bgLVZHzmmqq5CvL6ljz2qO3BhYi88qPCyJfHD2OjisdGPKbkZ0SaU3N6H v/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=b2L5AOqYSMRZaO9qmZ3HyDJX1gwxbGhEBv9GgTksLkA=; b=UkW09zPe3Rq0F+vVSqGj4SRQ9hKX+amwdxRGtL7SBX+ruWNwhVi0VdngKlcKtrj8Fh 1PlkLSeHdEk9uK4bxvfhkX8DJx9kXwIbggqTpO8ugGrlR4kG5ahLbQWZ8WioKGEIW5ao oQcOeHMTiQAOUphjkZG+U6/wLjCjs0ZpKuLmw6ZQrvU1PDeYWWqiEzQHT8g5qE7Nul+E T+JGUxR8PGEaCvl9Wjo60Ic8zcwu3duK848b89X6SJwTX9nJxntgg4RM/Rgb3gdsBiBU BJNuHm47FWeEwgfetJhSQ/ODPaQ34ZIt5jkuKrvgUhqJi2nbXHVvazJDnYflJUqJeqC/ rbng== X-Gm-Message-State: AKaTC00WtVzGYkZlMbzjYWGQHuf3UlM6G2nhhD8sD7iVIHh4YN46Zu8NEEMKH7bpEB3kpwhEMH9veHC0q3daTA== X-Received: by 10.36.33.151 with SMTP id e145mr7943878ita.14.1480102689841; Fri, 25 Nov 2016 11:38:09 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Fri, 25 Nov 2016 11:37:49 -0800 (PST) In-Reply-To: <201611251315.uAPDFSVL029907@repo.freebsd.org> References: <201611251315.uAPDFSVL029907@repo.freebsd.org> From: Ed Maste Date: Fri, 25 Nov 2016 14:37:49 -0500 X-Google-Sender-Auth: HqQ7vwxbaZ1Z4SogV0rERmjqLpo Message-ID: Subject: Re: svn commit: r309142 - in head: . gnu/usr.bin/binutils/ld share/mk tools/build/options usr.bin/clang/lld To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:38:10 -0000 On 25 November 2016 at 08:15, Ed Maste wrote: > Author: emaste > Date: Fri Nov 25 13:15:28 2016 > New Revision: 309142 > URL: https://svnweb.freebsd.org/changeset/base/309142 > > Log: > Add WITH_LLD_AS_LD build knob > > If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not > capable of linking the world and kernel, but can self-host and link many > substantial applications. GNU ld continues to be used for the world and > kernel build, regardless of how this knob is set. There was some confusion on IRC about this, so let me clarify. LLD 3.9 can link many applications on FreeBSD, including itself, Clang, etc. It cannot link (all of) the FreeBSD kernel and world. Additional changes have been made in LLD's subversion repo (after the 3.9 release), including improved linker script expression handling and symbol version map support. These changes are needed to build FreeBSD with lld. With a recent LLD built from source it's possible to build a working FreeBSD kernel and world excluding the boot loaders. I tested at FreeBSD r309151 and LLD r287869. The WITH_LLD_AS_LD knob does not affect buildworld. It will still build a bootstrap GNU ld and use it to link all of the userland to be installed. When WITH_LLD_AS_LD=yes installworld will install lld as /usr/bin/ld in the resulting system. The knob is being made available now for testing and experimentation, and to provide a linker in arm64 images that can be used to bootstrap either GNU ld or a later version of LLD.