Bug 79095 - x86/common_x86.c:348:14: error: use of undeclared identifier 'bit_SSE4_1'
Summary: x86/common_x86.c:348:14: error: use of undeclared identifier 'bit_SSE4_1'
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-05-23 01:51 UTC by Vinson Lee
Modified: 2014-06-07 20:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2014-05-23 01:51:47 UTC
mesa: f50361cce79beb78119d835b7a52c0c790d74077 (master 10.3.0-devel)

clang build error

  CC       common_x86.lo
x86/common_x86.c:348:14: error: use of undeclared identifier 'bit_SSE4_1'
   if (ecx & bit_SSE4_1)
             ^

commit a2fb71e23bced3f3585e91726590efe6034a10ed
Author: Matt Atwood <matthew.s.atwood@intel.com>
Date:   Fri May 2 09:44:44 2014 -0700

    mesa/x86: add SSE4.1 runtime detection.
    
    Add a bit to _mesa_x86_features for SSE 4.1, along with macros to query.
    
    Reviewed-by: Matt Turner <mattst88@gmail.com>
Comment 1 Matt Turner 2014-05-23 04:00:30 UTC
Great. Clang's macro is named wrong.
Comment 2 Jose Fonseca 2014-05-23 10:39:32 UTC
(In reply to comment #1)
> Great. Clang's macro is named wrong.

Yep, it appear so.

I took the liberty of pushing a simple fix:


commit 94dbc16dc4c1b7685a9dab89a39e8fea844194df
Author: José Fonseca <jfonseca@vmware.com>
Date:   Fri May 23 11:36:58 2014 +0100

    mesa/x86: Fix build with clang 3.4.
    
    It defines bit_SSE41 instead of bit_SSE4_1.
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=79095
    
    Trivial.
Comment 3 Matt Turner 2014-05-23 16:19:08 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Great. Clang's macro is named wrong.
> 
> Yep, it appear so.
> 
> I took the liberty of pushing a simple fix:
> 
> 
> commit 94dbc16dc4c1b7685a9dab89a39e8fea844194df
> Author: José Fonseca <jfonseca@vmware.com>
> Date:   Fri May 23 11:36:58 2014 +0100
> 
>     mesa/x86: Fix build with clang 3.4.
>     
>     It defines bit_SSE41 instead of bit_SSE4_1.
>     
>     Fixes https://bugs.freedesktop.org/show_bug.cgi?id=79095
>     
>     Trivial.

Thanks. I'm trying to get a patch accepted by clang to fix the macro name.
Comment 4 Vinson Lee 2014-05-23 17:57:49 UTC
Build are still broken with clang <= 3.3.
Comment 5 Vinson Lee 2014-06-07 20:22:37 UTC
commit f0748b50146ed3cda77c625efea67b1b032e7737
Author: Vinson Lee <vlee@freedesktop.org>
Date:   Sun May 25 21:32:49 2014 -0700

    mesa/x86: Fix build with clang <= 3.3.
    
    clang <= 3.3 cpuid.h does not define contants for feature bits.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79095
    Signed-off-by: Vinson Lee <vlee@freedesktop.org>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.