gcc/amd64 head build error after r281316
Hi, 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 immintrin.h header file. */ -#if defined(__FreeBSD__) defined(__amd64__) +#if defined(__clang__) defined(__FreeBSD__) defined(__amd64__) #define HAVE_IMMINTRIN_H 1 #endif cheers luigi ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: gcc/amd64 head build error after r281316
On 08 Jul 2015, at 19:05, Luigi Rizzo ri...@iet.unipi.it 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 immintrin.h 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 immintrin.h 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 signature.asc Description: Message signed with OpenPGP using GPGMail
Re: gcc/amd64 head build error after r281316
On Wed, Jul 8, 2015 at 9:36 PM, Dimitry Andric d...@freebsd.org wrote: On 08 Jul 2015, at 19:05, Luigi Rizzo ri...@iet.unipi.it 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 immintrin.h 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. i 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 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 immintrin.h 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 -- -+--- Prof. Luigi RIZZO, ri...@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) -+--- ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org