summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2020-06-27 17:03:35 +0300
committerDmitry Shachnev <mitya57@gmail.com>2020-06-30 10:53:35 +0000
commit834db4506d1aeae02d32fe41065d558300491d84 (patch)
tree97d04483eabddd87613962eb01fb760d9a6d296f
parent55995146abacbb9f2bd8e14ce476df1eb3225672 (diff)
Fix build on MIPS
On MIPS systems, "mips" is a built-in compiler macro. Undefine it to fix compilation errors: app/perfregisterinfo.cpp:55:12: error: expected unqualified-id before numeric constant 55 | static int mips[] = { 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, | ^~~~ Change-Id: I80680337a019629e53828d60fc8a233a7cc819d2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--app/perfregisterinfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/perfregisterinfo.cpp b/app/perfregisterinfo.cpp
index 2e69d5e..bc0831d 100644
--- a/app/perfregisterinfo.cpp
+++ b/app/perfregisterinfo.cpp
@@ -52,6 +52,10 @@ static int aarch64[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
static int x86[] = {0, 2, 3, 1, 7, 6, 4, 5, 8};
static int x86_64[] = {0, 3, 2, 1, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 8};
+#ifdef mips
+// On MIPS systems, "mips" is a built-in compiler macro.
+#undef mips
+#endif
static int mips[] = { 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31};