diff options
author | Alan Coopersmith <[email protected]> | 2011-10-20 17:14:05 -0700 |
---|---|---|
committer | Alan Coopersmith <[email protected]> | 2011-10-21 18:39:50 -0700 |
commit | 8c509e1181fc8be85587f290b0a9337724fb7a7b (patch) | |
tree | d41c407aeed229f5668856b92b10b58b816fee33 /src/mesa/main/imports.h | |
parent | df8f864bf6fb8dfd256455a5310ef70f820a5350 (diff) |
Fix gcc version checks for _mesa_bitcount
- Fix _GNUC__ typo in both checks
- Fix logic error in check for gcc < 3.4 that breaks for gcc 2.x & older
Without this fix, builds with gcc 3.4.x end up depending on undefined
_mesa_bitcount instead of gcc's __builtin_popcount.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Alan Coopersmith <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r-- | src/mesa/main/imports.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 20fa148fe59..9cb6c6cc352 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -576,7 +576,7 @@ _mesa_init_sqrt_table(void); #define _mesa_ffs(i) ffs(i) #define _mesa_ffsll(i) ffsll(i) -#if ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) +#if ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ #define _mesa_bitcount(i) __builtin_popcount(i) #define _mesa_bitcount_64(i) __builtin_popcountll(i) #else |