From owner-svn-src-all@freebsd.org Wed Jul 8 22:18:30 2015 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 C0FE6996784; Wed, 8 Jul 2015 22:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB3F3801; Wed, 8 Jul 2015 22:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::f8cf:5020:3455:425f] (unknown [IPv6:2001:7b8:3a7:0:f8cf:5020:3455:425f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F00162F493; Thu, 9 Jul 2015 00:18:27 +0200 (CEST) Subject: Re: svn commit: r285284 - head/lib/liblzma Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 (4db5779) From: Dimitry Andric In-Reply-To: Date: Thu, 9 Jul 2015 00:18:21 +0200 Cc: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 08 Jul 2015 22:18:31 -0000 --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Check whether the path starts with /usr/bin, maybe? Normally, you would check for the existence of a random header in a configure script. But from within a C source file, it's not that easy. That said, immintrin.h is available for all usable versions of clang, and should be available in all versions of gcc >=3D 4.4 (at least, if I read gcc's commit history correctly). And gcc in base is definitely not 4.4. :-) -Dimitry > On 09 Jul 2015, at 00: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 > 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 > -a >=20 >=20 > On 8 July 2015 at 14:09, Pedro Giffuni 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 >>> = =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 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 >>=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 --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F 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----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlWdobMACgkQsF6jCi4glqMbUwCeMAmafMmHyWL7OAoGDtidLBpa CaIAnitMnvu7gJM2WECH0aqy0H32OwUd =+Sxq -----END PGP SIGNATURE----- --Apple-Mail=_286F7370-89E1-4A22-8537-3AC60F4CE59F--