Re: FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 5 Jul 2016 20:52:42 +0200
On 05 Jul 2016, at 18:03, jenkins-admin_at_freebsd.org wrote:
> 
> FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing:
> 
> Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/
> Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/changes
> Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/console
...
> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function 'sse42_supported':
> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: 'bit_SSE42' undeclared (first use in this function)
>  return ((ecx & bit_SSE42) != 0);
>                 ^

So, this is because clang's and gcc's versions of cpuid.h use slightly different naming for these bits:

clang's cpuid.h:

#define bit_SSE41       0x00080000
#define bit_SSE42       0x00100000

gcc's cpuid.h:

#define bit_SSE4_1      (1 << 19)
#define bit_SSE4_2      (1 << 20)

Unfortunately there are more bit defines that differ.  No standardization on this point, it seems. :-/

For this specific compile error, we could put in a little crutch like:

#if defined(bit_SSE4_2) && !defined(bit_SSE42)
#define bit_SSE42 bit_SSE4_2
#endif

Thoughts?

-Dimitry


Received on Tue Jul 05 2016 - 16:52:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:06 UTC