From owner-svn-src-all@freebsd.org Mon Mar 27 16:01:18 2017 Return-Path: Delivered-To: svn-src-all@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 234B5D205F2; Mon, 27 Mar 2017 16:01:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B9EE77; Mon, 27 Mar 2017 16:01:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RG1Gjr057278; Mon, 27 Mar 2017 16:01:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RG1GeY057276; Mon, 27 Mar 2017 16:01:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201703271601.v2RG1GeY057276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 27 Mar 2017 16:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316029 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 16:01:18 -0000 Author: emaste Date: Mon Mar 27 16:01:16 2017 New Revision: 316029 URL: https://svnweb.freebsd.org/changeset/base/316029 Log: lld: hack version and help output for compatibility with libtool GNU libtool checks the output from invoking the linker with --version and --help, in order to determine the linker "flavour" and the command- ine arguments to use for various link operations (e.g. generating shared libraries). To detect GNU ld it looks for the strings "GNU" and "supported targets:.*elf". Since LLD is compatible with GNU ld we include those same strings to fool libtool. Quoting from a comment in the change: This is somewhat ugly hack, but in reality, we had no choice other than doing this. Considering the very long release cycle of Libtool, it is not easy to improve it to recognize LLD as a GNU compatible linker in a timely manner. Even if we can make it, there are still a lot of "configure" scripts out there that are generated by old version of Libtool. We cannot convince every software developer to migrate to the latest version and re-generate scripts. So we have this hack. Upstream LLVM revisions r298532, r298568, r298591 Obtained from: LLVM MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp head/contrib/llvm/tools/lld/ELF/DriverUtils.cpp Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Driver.cpp Mon Mar 27 15:20:31 2017 (r316028) +++ head/contrib/llvm/tools/lld/ELF/Driver.cpp Mon Mar 27 16:01:16 2017 (r316029) @@ -281,11 +281,27 @@ void LinkerDriver::main(ArrayRef