From owner-svn-src-head@freebsd.org Wed Jul 8 22:26:56 2015 Return-Path: Delivered-To: svn-src-head@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 518E199698A for ; Wed, 8 Jul 2015 22:26:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E87D11BB for ; Wed, 8 Jul 2015 22:26:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436394408; bh=QUaabOKjY69lYRrT2Yt67nGK+dirWC+ZwWhKm3bu4Ig=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=MLK878XZ/b6lViKzi1IVSSqanfDz79gp+RUxJ+n+xCmd+oD+Fq6E6jD/2OivjtbVRTdw05Y+YBkzzjLIZ2Hm9vdoY5JMBIiaQVLgkcDeUYTU5BgIYDWwnr59+uwwLhk/L4Q6I7QKWc3mILqH4SXQsj+JvafFFi78zyDKhJJVthbJ6MstD0y/zxGWmzR+2X87pVano37j33nNQjVIYv0jDbzx3GveFo3vPLxfDT5fn5zC5NmLroYU/SYVq3Ki9hCpoIqkRCG2+0n9kO6YF6TrJV2LvFyx4qHeWnLn8qLa5QArAFLxp86DVtGvmaSooBgwg3HL4wXpBXsxQTC8Dkya+w== Received: from [98.139.170.180] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 Received: from [98.139.211.204] by tm23.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 Received: from [127.0.0.1] by smtp213.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:26:48 -0000 X-Yahoo-Newman-Id: 704.20136.bm@smtp213.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: QuBflpAVM1kc5P6MMpWsGmM0_I7LFMHQ.TDBnrQdBlTiRMR x7z7Tpvo.8_fHBWOhPO4Wfd5Fz3JWxdf0hWgNaGJj2It_lAz8vxERMDX9Ig3 a9OClsftiHPQ8wdh1zDdyyLcSJY0kxb4.YaYmorpqrw1QHSf2d3Ss18bcCR4 bluMMoHByOxCjqn20NPGYg9H2bRa3c7c3gsTWxr6JQih7S82Sk0E9QASpwzW 7elJf7j3be4eNLy2b1mZSwz.QSgP17zC6vGmg9flvwjCHo2hbPBu41z36aNO qhBlnHED91iT20vkALVHrVA5bOEkB0gzbFtd3UnHbQqqnHkhiNH80rNexk68 zY0clWZbltCbvFaWLR6AfZZmL85wbK_TPc3q2ewS3y.e_pT4uhNGf1C3p6vI BpmfL0vtQ3Ss1.vEOO7lMZK.n1QuEg2VQnTN0yXOSuKkwjG.ePFloIf9Bk8U VqUuc_Xj6DRolRlpXNOZ3kwe.3TZSHIPI6pZWQL1qsNaG6DSd.MZes0R4F9O TMW69LXREWN.N2bfTT7zuMGewSMYuXygz X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559DA3AB.8060802@FreeBSD.org> Date: Wed, 08 Jul 2015 17:26:51 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dimitry Andric , Adrian Chadd CC: Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r285284 - head/lib/liblzma References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 22:26:56 -0000 On 07/08/15 17:18, Dimitry Andric wrote: > 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 >= 4.4 (at least, if I > read gcc's commit history correctly). And gcc in base is definitely not > 4.4. :-) Ahh yes, it's probably gcc 4.4 (I stopped following their changes long ago). Our internal gcc carries a couple of headers that were introduced in gcc 4.3 before the license change. Pedro. > -Dimitry > >> On 09 Jul 2015, at 00: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? >> >> 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.) >> >> >> -a >> >> >> On 8 July 2015 at 14:09, Pedro Giffuni 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 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. >>>