Re: [PATCH xf86-video-intel] configure: check for cpuid.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 31, 2014 at 11:53:06AM +0100, Chris Wilson wrote:
> On Sun, Aug 31, 2014 at 06:48:56PM +1000, Jonathan Gray wrote:
> > Instead of checking for a particular version of GCC check for
> > a cpuid.h with __cpuid_count.  This allows cpuid.h to be
> > provided for older/different compilers.
> > 
> > Signed-off-by: Jonathan Gray <jsg@xxxxxxxxx>
> 
> I didn't have much luck last time I tried with clang, but this seems to
> still work for me, so pushed.
> 
> To ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel
> 2086965..2c564c0  master -> master
> -Chris

Thanks, the particular case I have in mind is adding the clang
cpuid.h to gcc 4.2.1 for OpenBSD as cpuid.h is needed for
Mesa and a few other things as well.

http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/cpuid.h?revision=197399&view=co

The clang cpuid.h has all of the functions used it just needs some
small changes for bit values along the lines of the following patch.

These aren't needed for xf86-video-intel and Mesa as bit values
are defined in each project.

--- cpuid.h.orig	Sun Aug 31 22:15:36 2014
+++ cpuid.h	Sun Aug 31 22:15:46 2014
@@ -44,7 +44,9 @@
 #define bit_PCID        0x00020000
 #define bit_DCA         0x00040000
 #define bit_SSE41       0x00080000
+#define bit_SSE4_1      bit_SSE41   /* for gcc compat */
 #define bit_SSE42       0x00100000
+#define bit_SSE4_2      bit_SSE42   /* for gcc compat */
 #define bit_x2APIC      0x00200000
 #define bit_MOVBE       0x00400000
 #define bit_POPCNT      0x00800000
@@ -89,6 +91,7 @@
 
 /* Features in %ebx for level 7 sub-leaf 0 */
 #define bit_FSGSBASE    0x00000001
+#define bit_AVX2        0x00000020
 #define bit_SMEP        0x00000080
 #define bit_ENH_MOVSB   0x00000200
 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux