[Intel-gfx] [PATCH i-g-t 2/3] meson: Fix build of igt_x86-using tests on non-x86 platforms.
Eric Anholt
eric at anholt.net
Wed Sep 27 18:37:34 UTC 2017
Just stub out the features return value, and return an empty string.
Signed-off-by: Eric Anholt <eric at anholt.net>
---
lib/igt_x86.h | 12 ++++++++++++
lib/meson.build | 5 ++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/lib/igt_x86.h b/lib/igt_x86.h
index 589d224bec62..d6dcfa108331 100644
--- a/lib/igt_x86.h
+++ b/lib/igt_x86.h
@@ -40,7 +40,19 @@
#define AVX 0x80
#define AVX2 0x100
+#if defined(__x86_64__)
unsigned igt_x86_features(void);
char *igt_x86_features_to_string(unsigned features, char *line);
+#else
+static inline unsigned igt_x86_features(void)
+{
+ return 0;
+}
+static inline char *igt_x86_features_to_string(unsigned features, char *line)
+{
+ line[0] = 0;
+ return line;
+}
+#endif
#endif /* IGT_X86_H */
diff --git a/lib/meson.build b/lib/meson.build
index 203be520fd3f..df1dc465e310 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -54,7 +54,6 @@ lib_sources = [
'igt_rand.c',
'igt_stats.c',
'igt_sysfs.c',
- 'igt_x86.c',
'igt_vgem.c',
'instdone.c',
'intel_batchbuffer.c',
@@ -88,6 +87,10 @@ lib_sources = [
'igt_kmod.c',
]
+if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+ lib_sources += 'igt_x86.c'
+endif
+
lib_deps = [
cairo,
glib,
--
2.14.1
More information about the Intel-gfx
mailing list