Module: Mesa
Branch: master
Commit: 20b42fad9b705f59b2467226abac299a7d473920
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=20b42fad9b705f59b2467226abac299a7d473920

Author: Vinson Lee <[email protected]>
Date:   Fri May 10 11:24:18 2019 -0700

intel/tools: Fix build with glibc < 2.27.

glibc < 2.27 defines OVERFLOW in /usr/include/math.h.

This patch fixes this build error.

In file included from ../include/c99_math.h:37:0,
                 from ../src/util/u_math.h:44,
                 from ../src/mesa/main/macros.h:35,
                 from ../src/intel/compiler/brw_reg.h:47,
                 from ../src/intel/tools/i965_asm.h:32,
                 from ../src/intel/tools/i965_gram.y:29:
src/intel/tools/i965_gram.tab.c:562:5: error: expected identifier before 
numeric constant
     OVERFLOW = 412,
     ^

Fixes: 70308a5a8a80 ("intel/tools: New i965 instruction assembler tool")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110656
Signed-off-by: Vinson Lee <[email protected]>
Acked-by: Eric Engestrom <[email protected]>

---

 src/intel/tools/i965_asm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/tools/i965_asm.h b/src/intel/tools/i965_asm.h
index 7027f4e5fb4..dd29208198f 100644
--- a/src/intel/tools/i965_asm.h
+++ b/src/intel/tools/i965_asm.h
@@ -36,6 +36,9 @@
 #include "compiler/brw_eu.h"
 #include "dev/gen_device_info.h"
 
+/* glibc < 2.27 defines OVERFLOW in /usr/include/math.h. */
+#undef OVERFLOW
+
 void yyerror (char *);
 int yyparse(void);
 int yylex(void);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to