From owner-freebsd-current@freebsd.org Wed Jul 8 20:44:03 2015 Return-Path: Delivered-To: freebsd-current@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 00563997603 for ; Wed, 8 Jul 2015 20:44:03 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (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 62E5D36CF; Wed, 8 Jul 2015 20:44:02 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by lbzd8 with SMTP id d8so18129092lbz.0; Wed, 08 Jul 2015 13:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=uIC569tPDW6ArOWnVV8wp7hS8aIt5eNq9bTZebY0J8Y=; b=JUTO93Q1KhtC7GrDq5Gd/EY2ap+2Kl352Q4BkGZozmYx+SRmFfCRnbAhjSisG582HV Rd6Me5fJMkx3/reWE96yzLemb5lsUr1ecWcxZqIfpcymiVaRsnzJbReVbKcOx3sfTh1x VmdJpOcBvS6NF1I4NK561Sg6w4ylhJD2j9BLBwZZIrEXbzC1ZFrwgIDzdeSOnfTWv+at R5ODQP2dKHp3EEMJclGQ9dYZCTYKDtDmW8vES9aILRU7naZibTKb03yP/YwJIBf354mX HnIBo7jXRxfpHhgq6+Uj+AKMSegujetn7/qkVf0MBgNg0M74+oqoMmMp+T4BmAbFM6rY Os8A== MIME-Version: 1.0 X-Received: by 10.112.220.7 with SMTP id ps7mr11297053lbc.72.1436388239526; Wed, 08 Jul 2015 13:43:59 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.230.103 with HTTP; Wed, 8 Jul 2015 13:43:59 -0700 (PDT) In-Reply-To: References: <20150708170514.GA47276@onelab2.iet.unipi.it> Date: Wed, 8 Jul 2015 22:43:59 +0200 X-Google-Sender-Auth: x1BjcIsuNFFN_mv5MUUmxEpSscw Message-ID: Subject: Re: gcc/amd64 head build error after r281316 From: Luigi Rizzo To: Dimitry Andric Cc: Xin LI , freebsd-current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 20:44:03 -0000 On Wed, Jul 8, 2015 at 9:36 PM, Dimitry Andric wrote: > On 08 Jul 2015, at 19:05, Luigi Rizzo wrote: > > > > the r281316 commit introduces the following lines > > which break compilation with gcc on amd64 (as far as i know > > immintrin.h is only available in our clang). > > If there are no objections I'd like to add a further check > > for the use of clang, see attached patch > > > > Index: /home/luigi/FreeBSD/head/lib/liblzma/config.h > > =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 > > --- /home/luigi/FreeBSD/head/lib/liblzma/config.h (revision 28528= 1) > > +++ /home/luigi/FreeBSD/head/lib/liblzma/config.h (working copy) > > @@ -150,7 +150,7 @@ > > #define HAVE_ICONV 1 > > > > /* Define to 1 if you have the header file. */ > > -#if defined(__FreeBSD__) && defined(__amd64__) > > +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) > > #define HAVE_IMMINTRIN_H 1 > > #endif > > Hi Luigi, > > I just saw you already committed this, but can we change this so it also > detects gcc >=3D 4.4.0, where immintrin.h was introduced? So then it > works nicely for external gcc's too. > =E2=80=8Bi have no objections, but i don't know how to test it so if you have a better fix feel free to go ahead and commit it. cheers luigi =E2=80=8B > > E.g.: > > Index: lib/liblzma/config.h > =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 > --- lib/liblzma/config.h (revision 285287) > +++ lib/liblzma/config.h (working copy) > @@ -151,7 +151,9 @@ > > /* Define to 1 if you have the header file. */ > /* FreeBSD - only with clang because the base gcc does not support it */ > -#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) > +#if (defined(__clang__) || \ > + __GNUC__ > 4 || (__GNUC__ =3D=3D 4 && __GNUC_MINOR >=3D 4)) \ > + && defined(__FreeBSD__) && defined(__amd64__) > #define HAVE_IMMINTRIN_H 1 > #endif > > Additionally, why are we checking for __FreeBSD__ here? This config > file is very specifically for use during buildworld, so I don't see the > use in checking it at all. > > -Dimitry > > --=20 -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------