svn commit: r285284 - head/lib/liblzma

Pedro Giffuni pfg at FreeBSD.org
Wed Jul 8 22:42:39 UTC 2015



On 07/08/15 17:28, Adrian Chadd wrote:
> hi,
>
> ok. would it be possible to add a blessed way to say "this is the
> freebsd modified compiler in-tree" ?

Exactly why do you want this? We don't really have
many differences with the vendor versions.

Look at sys/sys/cdefs.h for examples on how we figure
out which features or attributes are available. I have been
exercising those in the libc headers extensively :).

Pedro.

> I'd like to see / play around with more external-toolchain driven
> building and using it for port bringups.
>
> Thanks,
>
>
> -adrian
>
>
> On 8 July 2015 at 15:22, Pedro Giffuni <pfg at freebsd.org> wrote:
>>
>> On 07/08/15 17:04, Adrian Chadd wrote:
>>> Is there a blessed way to see whether the compiler we're using is an
>>> external compiler, or an internal one?
>>
>> No blessed way: you still have to determine the version of
>> the external compiler for most purposes anyways.
>> The internal compiler (even clang) always reports itself
>> as gcc 4.2.
>>
>>> eg, the version check isn't enough - it's just a number. how do I know
>>> if it's freebsd clang versus upstream clang?
>>> (Or in my instance, freebsd-gcc versus upstream-gcc.)
>>
>> If the compiler reports itself as gcc >= 4.3 it is surely an
>> external compiler. The tricky part is that our internal gcc
>> supports some gcc 4.3 flags and Apple extensions
>> (blocks), but those are not causing a problem AFAICT.
>>
>> Pedro.
>>
>>
>>> -a
>>>
>>>
>>> On 8 July 2015 at 14:09, Pedro Giffuni <pfg at freebsd.org> wrote:
>>>>
>>>> On 07/08/15 13:36, Luigi Rizzo wrote:
>>>>> Author: luigi
>>>>> Date: Wed Jul  8 18:36:37 2015
>>>>> New Revision: 285284
>>>>> URL: https://svnweb.freebsd.org/changeset/base/285284
>>>>>
>>>>> Log:
>>>>>      only enable immintrin when clang is used. The base gcc does not
>>>>> support
>>>>> it.
>>>>>         Reviewed by:      delphij
>>>>>
>>>>> Modified:
>>>>>      head/lib/liblzma/config.h
>>>>>
>>>>> Modified: head/lib/liblzma/config.h
>>>>>
>>>>>
>>>>> ==============================================================================
>>>>> --- head/lib/liblzma/config.h   Wed Jul  8 18:12:24 2015
>>>>> (r285283)
>>>>> +++ head/lib/liblzma/config.h   Wed Jul  8 18:36:37 2015
>>>>> (r285284)
>>>>> @@ -150,7 +150,8 @@
>>>>>     #define HAVE_ICONV 1
>>>>>       /* Define to 1 if you have the <immintrin.h> header file. */
>>>>> -#if defined(__FreeBSD__) && defined(__amd64__)
>>>>> +/* FreeBSD - only with clang because the base gcc does not support it
>>>>> */
>>>>> +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__)
>>>>>     #define HAVE_IMMINTRIN_H 1
>>>>>     #endif
>>>>>
>>>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden)
>>>> effect when building with an external gcc.
>>>>
>>>> Pedro.
>>>>



More information about the svn-src-all mailing list