From owner-svn-src-all@freebsd.org Wed Jul 8 22:28:18 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 E99DE9969F4; Wed, 8 Jul 2015 22:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (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 BDED415AE; Wed, 8 Jul 2015 22:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igau2 with SMTP id u2so75336006iga.0; Wed, 08 Jul 2015 15:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FBh2qqWmIog4B5pvWlVTwjcdidJczTnKKjEXuyrPzCI=; b=XuVPgVk3NG4jo1NCoesDdfp7rgJbTbvZkpdBMh4iY7PV3fIjPwseSAnoOtIqZjFg2I 28wuCLHTTfn5VSWBPgcxNlZi/KPpXnlu9ZTheJqQD7rjwbTjuUHZBYt3XeMg+ky0PM9Q 5B/8qblNWvKdy5rukM1efV57MAiWaP1loPcMSe1ykOm9l5CsrKWSgVCX4MvAaraXGxhj upTin3g6r1+6APSeLI9FBbGPg8YM18APssltKgFNI0hFeWD8ofOTuiL6xS4FDnmAk9oB lBl2GxTKoMvqOpmZ6/dLiIOcscJJ9HyM1Xvp7ENpHSUbv8JhyjYb/U64kBhg6PTXdq6P enkw== MIME-Version: 1.0 X-Received: by 10.50.171.232 with SMTP id ax8mr23518000igc.32.1436394497235; Wed, 08 Jul 2015 15:28:17 -0700 (PDT) Received: by 10.36.38.133 with HTTP; Wed, 8 Jul 2015 15:28:17 -0700 (PDT) In-Reply-To: <559DA2AE.2090202@FreeBSD.org> References: <201507081836.t68IacJu069563@repo.freebsd.org> <559D9172.9040305@FreeBSD.org> <559DA2AE.2090202@FreeBSD.org> Date: Wed, 8 Jul 2015 15:28:17 -0700 Message-ID: Subject: Re: svn commit: r285284 - head/lib/liblzma From: Adrian Chadd To: Pedro Giffuni Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 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:28:18 -0000 hi, ok. would it be possible to add a blessed way to say "this is the freebsd modified compiler in-tree" ? 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 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 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. >>> >