Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2015 16:34:31 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        Pedro Giffuni <pfg@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r285284 - head/lib/liblzma
Message-ID:  <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com>
In-Reply-To: <CAJ-VmonxnFt47D6qE199e%2BvxVPxiO5512i=X0R9meY-1Z1r_eQ@mail.gmail.com>
References:  <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <CAJ-Vmo=m0Y%2BE0oi5ec5RzyziqObOj=fKY1K-8HzqK8x7D_TcKg@mail.gmail.com> <559DA2AE.2090202@FreeBSD.org> <CAJ-VmonxnFt47D6qE199e%2BvxVPxiO5512i=X0R9meY-1Z1r_eQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

I doubt it would ever be useful.
For gcc, just test for 4.2.1.
For clang, what specific feature do you need to test for?

Do you have a specific use case in mind?

This strikes me as a really bad idea absent some use case that has a =
real example behind it.

Warner

> On Jul 8, 2015, at 4:28 PM, Adrian Chadd <adrian.chadd@gmail.com> =
wrote:
>=20
> hi,
>=20
> ok. would it be possible to add a blessed way to say "this is the
> freebsd modified compiler in-tree" ?
>=20
> I'd like to see / play around with more external-toolchain driven
> building and using it for port bringups.
>=20
> Thanks,
>=20
>=20
> -adrian
>=20
>=20
> On 8 July 2015 at 15:22, Pedro Giffuni <pfg@freebsd.org> wrote:
>>=20
>>=20
>> On 07/08/15 17:04, Adrian Chadd wrote:
>>>=20
>>> Is there a blessed way to see whether the compiler we're using is an
>>> external compiler, or an internal one?
>>=20
>>=20
>> 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.
>>=20
>>> 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.)
>>=20
>>=20
>> If the compiler reports itself as gcc >=3D 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.
>>=20
>> Pedro.
>>=20
>>=20
>>>=20
>>> -a
>>>=20
>>>=20
>>> On 8 July 2015 at 14:09, Pedro Giffuni <pfg@freebsd.org> wrote:
>>>>=20
>>>>=20
>>>> On 07/08/15 13:36, Luigi Rizzo wrote:
>>>>>=20
>>>>> Author: luigi
>>>>> Date: Wed Jul  8 18:36:37 2015
>>>>> New Revision: 285284
>>>>> URL: https://svnweb.freebsd.org/changeset/base/285284
>>>>>=20
>>>>> Log:
>>>>>    only enable immintrin when clang is used. The base gcc does not
>>>>> support
>>>>> it.
>>>>>       Reviewed by:      delphij
>>>>>=20
>>>>> Modified:
>>>>>    head/lib/liblzma/config.h
>>>>>=20
>>>>> Modified: head/lib/liblzma/config.h
>>>>>=20
>>>>>=20
>>>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>>>>> --- 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
>>>>>=20
>>>> FWIW, gcc 4.3+ does have it so this may some undesired (but hidden)
>>>> effect when building with an external gcc.
>>>>=20
>>>> Pedro.
>>>>=20
>>=20
>=20


--Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVnaV3AAoJEGwc0Sh9sBEAb2kQAOEg5QjkRG0yC3ggt5SgQ+us
E9POokF1qOfyT7duO/OhFWiZX3vi4gP1aYTibdzP6MyqvQ1LA4vmQ3J0E6CF6VzK
irpZGEyKNz1ZS1CpSjWAr2GyNn5lZ8mVsZibxF06+Z9E83f5pkqnxhy8QK2QRoTv
yOVxhuAX2LGp+JB+kfVXaOQge3CUv/3+SyUzOA3MpGrrKVQ+UhZU7ZMD9qbLXU+4
fSqK9nXwUJP2+nXuw95ZLbKN5DOuLd2cSZQi+1Fgukdj3dZZv6Ll249641G3I0Vc
Eltzi5IzuY3X33vm5Q8OTmTW8Dk9xd8i31C0dNNYkIcWvDyAlFdu6mPccFjbgB/L
mrzDwNU7eICWny7Lm8pisCTmadEimhZMwgRgXctsGjGfJOXT9SBHW4ANwZzjBrmf
2bB74PcyXcws8bL6KJuq4cIDxjNoqU6prZ1nhhLUK4jlX1GqDyR6eANz80VIbvcf
YalHOIGMv6kBg6+mfWs+t/DW1Q1XQiDlF6lG5ErK1nEhvq6dIT6HexwRxCAcgPzS
jf4jqzfHtYvArtU1SWyqXHiloIxVi282+Ei15aYiRfq4fSUuItNz/EK1EEgpj0Mi
Yx4+ZiKDx3nmcO9O96cOI+cKf1rduyztaX0e3+mnLDCTQbwJEUIcmtMGuUfzGLJ0
btWVlTqyltTBpSQEyDv6
=mxVg
-----END PGP SIGNATURE-----

--Apple-Mail=_F9AD8F9D-4C77-437A-B3CB-F29CB1CD24A4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F6CFFCA-3901-4F18-AF30-EC621E5A4E06>