From owner-svn-src-head@freebsd.org Tue Oct 31 00:03:33 2017 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 8CDF0E2F884; Tue, 31 Oct 2017 00:03:33 +0000 (UTC) (envelope-from bdrewery@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 497E077A4F; Tue, 31 Oct 2017 00:03:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9V03WqI046830; Tue, 31 Oct 2017 00:03:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9V03W3R046829; Tue, 31 Oct 2017 00:03:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201710310003.v9V03W3R046829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 31 Oct 2017 00:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325180 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Tue, 31 Oct 2017 00:03:33 -0000 Author: bdrewery Date: Tue Oct 31 00:03:32 2017 New Revision: 325180 URL: https://svnweb.freebsd.org/changeset/base/325180 Log: Follow-up r320149: Enable GPL_DTC if we're using GCC as the cross-compiler. This fixes object files landing in the source tree in gnu/usr.bin/dtc for GCC platforms. We cannot reliably detect if an external compiler is used here, and the default YES option does include GCC_BOOTSTRAP which implies that GCC may be used for the build. The problem manifests when not using an external compiler, and the host compiler is clang. When a fresh build is done (no OBJDIR yet) the 'make obj' treewalk is done before 'make cross-tools', so COMPILER_FEATURES at this point contains 'c++11' since the host compiler was used for COMPILER_FEATURES. Once cross-tools builds the GCC bootstrap compiler and then descends into 'make everything', COMPILER_FEATURES no longer contains 'c++11' and MK_GPL_DTC defaults to enabled. Now it builds in gnu/usr.bin/dtc without an OBJDIR preset and drops files into the source tree. The COMPILER_FEATURES check here is useful for knowing if we can *bootstrap* C++11 things. Indeed we do bootstrap dtc as a build tool so it is useful for enabling the BSD dtc for the build, but we end up needing the GPL dtc for installation anyway. Reviewed by: manu, emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12817 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Oct 31 00:03:29 2017 (r325179) +++ head/share/mk/src.opts.mk Tue Oct 31 00:03:32 2017 (r325180) @@ -227,8 +227,8 @@ __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC GPL_DTC LLD +__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC +__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD .else # Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC