From owner-svn-src-all@freebsd.org Wed Jul 8 22:43:05 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 1E24C996DBB for ; Wed, 8 Jul 2015 22:43:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B353233FD for ; Wed, 8 Jul 2015 22:43:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pddu5 with SMTP id u5so65649456pdd.3 for ; Wed, 08 Jul 2015 15:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=fROjGjClX+qYiSpOPWM7tdI3ExGrfpMAd+gDE5gJ9QE=; b=asyyY+sxYHaKOCsFakKEkn4gNS4ljCaemPNKOdPU+o0J9wmhZIDvlqsYJx/Ri5FMko 2k4X/4zAVbiXhhMclNJRnjYOdOsun1Py7RIyQnFjPQe3p/C4YqEk1Ylmya2dpfITPfyJ 28qtIWEXyLKk2rcZRmvOZpjvk6T2p1XB2ywsn7HPR2SLDpi1WVUxB7CtPueXzDmIQgCD aq/g16+Zsywm3YtS9LlN0CZeUk++NIDe4NC/iSV6Gntti/HH7o1HjbegHmTqSH3zJeMZ YUyhjUBluKVZuR05C14cYn0wVDltACQABikRmbxq/Yt9oImQIwPft+UgqiptmwyFUyZ3 bJBw== X-Gm-Message-State: ALoCoQkC/MpsTrao/p2ncBfZOzsmuKVatoIFGZSsWxwmzQqciiSPCo7+/GSL7t2YQFNx5wHV2bAH X-Received: by 10.70.134.163 with SMTP id pl3mr24663387pdb.142.1436395377921; Wed, 08 Jul 2015 15:42:57 -0700 (PDT) Received: from [10.64.26.63] ([69.53.236.236]) by smtp.gmail.com with ESMTPSA id ug1sm3613939pbc.39.2015.07.08.15.42.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 15:42:57 -0700 (PDT) Sender: Warner Losh 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=_FF7CDB04-F949-42A5-B190-06AC79AB2385"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: Date: Wed, 8 Jul 2015 16:42:54 -0600 Cc: Pedro Giffuni , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <4199933E-38A3-447F-9485-BC4AFC6B370D@bsdimp.com> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> <1F6CFFCA-3901-4F18-AF30-EC621E5A4E06@bsdimp.com> 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:43:05 -0000 --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 > On Jul 8, 2015, at 4:37 PM, Adrian Chadd = wrote: >=20 > On 8 July 2015 at 15:34, Warner Losh wrote: >> 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? >>=20 >> Do you have a specific use case in mind? >>=20 >> This strikes me as a really bad idea absent some use case that has a = real example behind it. >=20 > Well, vendors have in the past shipped modified compilers for systems > they're doing bring-up on. So if there are differences between the > in-tree compiler for a given clang version and the vendor supplied > modified one, I'd like to know. >=20 > I know it's going to be a while until another CPU family with a > not-yet-upstream compiler comes out.. I=E2=80=99m having trouble understanding when this would be generally = useful. If we have a situation where the exact same clang version as we have in = the tree is also the version of the compiler a vendor released and there=E2=80=99s = some substantial difference between the two such that you need conditional code to make = it work on both, that might be one scenario. But such a scenario hasn=E2=80=99t = come up in the past very often, and generally it has been resolved with an ifdef = __arch__ sort of thing because the in-tree compiler didn=E2=80=99t support that CPU well = enough to use, while the out of tree one did. Warner > -a >=20 >> Warner >>=20 >>> On Jul 8, 2015, at 4:28 PM, Adrian Chadd = 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 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 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 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 >>=20 --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385 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 iQIcBAEBCgAGBQJVnaduAAoJEGwc0Sh9sBEAQmAP/1BSRgrTwpGDDNGpIX5WjyKY AsL+fq6fUcykblZerZIyHc9BS2jczpfcnsCxGdceefz7Dn9ccTzcCcyAb8h5LxdY O6+JOCW8smJtzft1e4KkyKA3BVqJ7rcbGzYXt/pdlOARzJhD694ptRYBGxl2Gbq7 G9Crxlsc4K0uhzChcCQte6zfqtqeic2O8lsFSzh09u+36qZfvcnkmzjJ2/qLaQke ZDVG3hdNUMlfMCuOap7w9G01j1Fhm2nTOztgTIMIUsiRZLFBLaP/vMmtuwvgWAWC 3c168tLc1/xz0IRqHKZWgx0IRnSBHTN45F/1L+Law2ux8USebBsN1HZ8km8aS9TP zWDXa9IS38w71WJytzGCd/gRe+TUxS7lOtCmRFGX3/uHMgnSDiWZ1OcJ0Czg3pUs 2sJOj2EsCY5rYg2EtR5VygMjpNODCIwuDKm69mpHPor8ZWK5owCHfyM7HzyMQ7CU be5RytCcLkPdiUUG3DmFCsu3/rXH+HUpc+JXjUaky0pZHPk1klHfWZ5p54bu08vN KaIlpHdA4JujE0rYcgqtwe4oPOkIVrSriF2jC1tj6Bsm75YDMjCLvRG0TQzI3quh T6nrmCSRKpoF1z+t8v1HuHy/5P7gNrAEd/qbK6O7WRJq0h0YV7MpSrDBL6AKQkMf CxB+lHatLtxg4Q3H9gCp =P/u+ -----END PGP SIGNATURE----- --Apple-Mail=_FF7CDB04-F949-42A5-B190-06AC79AB2385--