From owner-svn-src-all@freebsd.org Fri Jun 3 16:17:37 2016 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 CF7DBB685A0; Fri, 3 Jun 2016 16:17:37 +0000 (UTC) (envelope-from dim@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 83FA5165F; Fri, 3 Jun 2016 16:17:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u53GHaoa088349; Fri, 3 Jun 2016 16:17:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u53GHaEB088345; Fri, 3 Jun 2016 16:17:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201606031617.u53GHaEB088345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Jun 2016 16:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301277 - in head: . lib/clang lib/clang/include/clang/Basic lib/clang/libclangbasic 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.22 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: Fri, 03 Jun 2016 16:17:37 -0000 Author: dim Date: Fri Jun 3 16:17:36 2016 New Revision: 301277 URL: https://svnweb.freebsd.org/changeset/base/301277 Log: For clang, move the definition of FREEBSD_CC_VERSION into its own header file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc. The header is only included from one .cpp file in the clang tree. This minimizes the number of .cpp files that need to be rebuilt if the version is bumped. Discussed with: bdrewery Added: head/lib/clang/freebsd_cc_version.h (contents, props changed) Modified: head/Makefile.inc1 head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/libclangbasic/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 3 15:33:21 2016 (r301276) +++ head/Makefile.inc1 Fri Jun 3 16:17:36 2016 (r301277) @@ -99,7 +99,7 @@ _expected_compiler_type= gcc .if ${_expected_compiler_type} == "clang" CROSS_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ - ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown + ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown CROSS_COMPILER_VERSION!= \ awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown Added: head/lib/clang/freebsd_cc_version.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/freebsd_cc_version.h Fri Jun 3 16:17:36 2016 (r301277) @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ + +#define FREEBSD_CC_VERSION 1100004 Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Fri Jun 3 15:33:21 2016 (r301276) +++ head/lib/clang/include/clang/Basic/Version.inc Fri Jun 3 16:17:36 2016 (r301277) @@ -8,5 +8,3 @@ #define CLANG_VENDOR "FreeBSD " #define SVN_REVISION "262564" - -#define FREEBSD_CC_VERSION 1100004U Modified: head/lib/clang/libclangbasic/Makefile ============================================================================== --- head/lib/clang/libclangbasic/Makefile Fri Jun 3 15:33:21 2016 (r301276) +++ head/lib/clang/libclangbasic/Makefile Fri Jun 3 16:17:36 2016 (r301277) @@ -50,3 +50,6 @@ TGHDRS= AttrHasAttributeImpl \ # XX: work around GCC bug 67888 CFLAGS.gcc += -fpermissive + +# Ensure FREEBSD_CC_VERSION is defined for Targets.cpp +CFLAGS.Targets.cpp+= -include ../freebsd_cc_version.h