On 03.06.2016 20:44, Bryan Drewery wrote:
> Thanks!
> 
> I think this helps Andrey's recent clang rebuild issues as well since
> the quite-common file was being touched often.

Thanx!

> 
> 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
>>
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to