From owner-freebsd-current@freebsd.org Wed Jul 8 19:36:25 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 004BD996A7D for ; Wed, 8 Jul 2015 19:36:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B581F1EF2; Wed, 8 Jul 2015 19:36:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::f8cf:5020:3455:425f] (unknown [IPv6:2001:7b8:3a7:0:f8cf:5020:3455:425f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0CC5C2F25D; Wed, 8 Jul 2015 21:36:10 +0200 (CEST) Subject: Re: gcc/amd64 head build error after r281316 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AEB0E835-EF32-44CB-8966-F56B07FD3ACF"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 (4db5779) From: Dimitry Andric In-Reply-To: <20150708170514.GA47276@onelab2.iet.unipi.it> Date: Wed, 8 Jul 2015 21:36:02 +0200 Cc: delphij@freebsd.org, freebsd-current Message-Id: References: <20150708170514.GA47276@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.2102) 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 19:36:25 -0000 --Apple-Mail=_AEB0E835-EF32-44CB-8966-F56B07FD3ACF Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 > =================================================================== > --- /home/luigi/FreeBSD/head/lib/liblzma/config.h (revision 285281) > +++ /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 >= 4.4.0, where immintrin.h was introduced? So then it works nicely for external gcc's too. E.g.: Index: lib/liblzma/config.h =================================================================== --- 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__ == 4 && __GNUC_MINOR >= 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 --Apple-Mail=_AEB0E835-EF32-44CB-8966-F56B07FD3ACF 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----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlWde6kACgkQsF6jCi4glqMY/QCfWNq3Q8t0CxQjuypHRxJIJvxH gxQAoPuhlmfTIMWDSI3ESfoUu9Mo9eMF =HZhh -----END PGP SIGNATURE----- --Apple-Mail=_AEB0E835-EF32-44CB-8966-F56B07FD3ACF--