summaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch82
-rw-r--r--recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.20.bb2
2 files changed, 84 insertions, 0 deletions
diff --git a/recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch b/recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch
new file mode 100644
index 00000000..0c8c24c1
--- /dev/null
+++ b/recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch
@@ -0,0 +1,82 @@
1From 4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d Mon Sep 17 00:00:00 2001
2From: Thierry Reding <treding@nvidia.com>
3Date: Thu, 12 Oct 2017 10:33:37 +0200
4Subject: [PATCH] lib: Fix compilation on non-x86
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The meson build avoids the failure by excluding the igt_x86.c file from
10the compilation. autotools being what they are don't support that in an
11easy way, so just use the preprocessor to avoid the duplicate function
12definitions.
13
14Since igt_x86.c will now be ignored for non-x86 builds, the meson work-
15around can be removed.
16
17Upstream-Status: backport.
18
19Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
20Signed-off-by: Thierry Reding <treding@nvidia.com>
21---
22 lib/igt_x86.c | 2 ++
23 lib/igt_x86.h | 2 +-
24 lib/meson.build | 5 +----
25 3 files changed, 4 insertions(+), 5 deletions(-)
26
27diff --git a/lib/igt_x86.c b/lib/igt_x86.c
28index 0f0963ce..0ed3c6f1 100644
29--- a/lib/igt_x86.c
30+++ b/lib/igt_x86.c
31@@ -93,6 +93,7 @@
32
33 #define has_YMM 0x1
34
35+#if defined(__x86_64__) || defined(__i386__)
36 unsigned igt_x86_features(void)
37 {
38 unsigned max = __get_cpuid_max(BASIC_CPUID, 0);
39@@ -172,3 +173,4 @@ char *igt_x86_features_to_string(unsigned features, char *line)
40
41 return ret;
42 }
43+#endif
44diff --git a/lib/igt_x86.h b/lib/igt_x86.h
45index d6dcfa10..27b7f0fd 100644
46--- a/lib/igt_x86.h
47+++ b/lib/igt_x86.h
48@@ -40,7 +40,7 @@
49 #define AVX 0x80
50 #define AVX2 0x100
51
52-#if defined(__x86_64__)
53+#if defined(__x86_64__) || defined(__i386__)
54 unsigned igt_x86_features(void);
55 char *igt_x86_features_to_string(unsigned features, char *line);
56 #else
57diff --git a/lib/meson.build b/lib/meson.build
58index b31c68e4..ddf93ec6 100644
59--- a/lib/meson.build
60+++ b/lib/meson.build
61@@ -64,6 +64,7 @@ lib_sources = [
62 'igt_syncobj.c',
63 'igt_sysfs.c',
64 'igt_vgem.c',
65+ 'igt_x86.c',
66 'instdone.c',
67 'intel_batchbuffer.c',
68 'intel_chipset.c',
69@@ -96,10 +97,6 @@ lib_sources = [
70 'igt_kmod.c',
71 ]
72
73-if ['x86', 'x86_64'].contains(host_machine.cpu_family())
74- lib_sources += 'igt_x86.c'
75-endif
76-
77 lib_deps = [
78 cairo,
79 glib,
80--
812.14.3
82
diff --git a/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.20.bb b/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.20.bb
index c4939a64..4fdd0911 100644
--- a/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.20.bb
+++ b/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.20.bb
@@ -9,6 +9,8 @@ LICENSE_append = " & ISC"
9 9
10inherit autotools gtk-doc 10inherit autotools gtk-doc
11 11
12SRC_URI += "file://0001-lib-Fix-compilation-on-non-x86.patch"
13
12DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps" 14DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps"
13RDEPENDS_${PN} += "bash" 15RDEPENDS_${PN} += "bash"
14RDEPENDS_${PN}-tests += "bash" 16RDEPENDS_${PN}-tests += "bash"