From owner-svn-src-all@freebsd.org Wed Jul 8 22:42:38 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 DC33F996D55 for ; Wed, 8 Jul 2015 22:42:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm48.bullet.mail.bf1.yahoo.com (nm48.bullet.mail.bf1.yahoo.com [216.109.114.64]) (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 9288A324B for ; Wed, 8 Jul 2015 22:42:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436394987; bh=gfPMxlZk5ejJkLYHWRIEm/LS6XptS82V37EmWAbdxLo=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=Omuk1yrZ0OUb7QNTsedMCsJ4Xh/pSjwQo7ViB3KXyhX/QygKJgTHhGrpu5yN89MQ9eDakaXvvM4x1I0gOM+k00i3+x319lGkoDgRv7RFO2IbqZBikOSlQlMyJBT1ZBwnvXym5bCjDVm9G4a5TceSKSdguQfdKdr7hhK1hIEqoEoLwVMOiJI3sMtAWStC/MdeYeYY1dqUf77zeG6dRGS0eWVy/+/2XjBAuGTmS8DPE2pnG1pey+kwATSiScyoR537L5EtQPSG+geL1d5XALksZDG9vQqc/LFj6ENBSUFpkAnFBqvf2U1tHabS7i2yWado6pgLYJULtTL02Psnh+ZJnw== Received: from [98.139.215.143] by nm48.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 Received: from [98.139.211.202] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 08 Jul 2015 22:36:27 -0000 X-Yahoo-Newman-Id: 249383.26147.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DD8JYLUVM1lbPw3OFDwyd0DodlyfhUI7ptLzPoXgSx9pO_g j6hcJ88AyncTtzU_0wrkEjEl_XP6ZwaI5cqcaDEBykrgzM7ehG2FLcJn89Jm 7PkdI0WlmcKk2DftXAPOKFlitR5mDd5q1d6XFhj5_nqyz1zdbgXil0ej1i6W aXRTYyTdhqPl75UAS.YIdLaLr9eZhs2RC67XSARxAFJXgfpQPhUyDACgTaGz 5.6domnCwhWxim421JGljVk0lJQ.17HXo03uQ6T2yIKP2uu04Ja9vbCR6qx5 w.TeGi59fXq_xWA7DI4dB_eSBMBUjqafE8G43JPlWYkh6AMvx4hItKCcxZKA 6wkZnBcQNklG5XOY5qPnYSHEZ9_Bvzq7d_rVPtIJzbtL6tmgtb2tv6qsZtGs SfXdqrNLH2m_gZlS9mE7ohV2tVKa7cUaKQaaq_2bSV_vWnaPU.p9y4Q6aqVg r2Ge.NtUZjg_payXTqeanU7gNyiic_yPdLq3usIC5zRAUd1guUVQ8p.H5V.s iJFXeUPznUFhaBPlX_Q8WvpSAjbQOl7Mt X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <559DA5F0.4090302@FreeBSD.org> Date: Wed, 08 Jul 2015 17:36:32 -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: Adrian Chadd CC: "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> <559DA2AE.2090202@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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:42:39 -0000 On 07/08/15 17:28, Adrian Chadd wrote: > hi, > > ok. would it be possible to add a blessed way to say "this is the > freebsd modified compiler in-tree" ? Exactly why do you want this? We don't really have many differences with the vendor versions. Look at sys/sys/cdefs.h for examples on how we figure out which features or attributes are available. I have been exercising those in the libc headers extensively :). Pedro. > 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. >>>>