svn commit: r301277 - in head: . lib/clang lib/clang/include/clang/Basic lib/clang/libclangbasic
Bryan Drewery
bdrewery at FreeBSD.org
Fri Jun 3 17:46:00 UTC 2016
On 6/3/2016 9:17 AM, Dimitry Andric wrote:
> 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
>
We're going to want a similar fix for GCC as well since its version is
currently in a common header of ./gnu/usr.bin/cc/cc_tools/freebsd-native.h.
I don't have time to address it today but can look sometime in the next
few weeks if no one does it before me.
--
Regards,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20160603/c7809558/attachment.sig>
More information about the svn-src-all
mailing list