summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-01-18 13:33:35 -0800
committerCalifornia Sullivan <california.l.sullivan@intel.com>2018-01-19 13:44:14 -0800
commitbe9a2e5ae2105000b7ce92a30ed512b676280252 (patch)
treed93bc7eeb066b9acfd312269a0e4805519fda640 /recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch
parent7bf03f7612834142355189c46ccdb4b309acc58a (diff)
downloadmeta-intel-be9a2e5ae2105000b7ce92a30ed512b676280252.tar.gz
intel-gpu-tools: backport patch fixing 32-bit builds
Fixes the following error seen in 32-bit builds: | ../../intel-gpu-tools-1.20/lib/igt_x86.c:96:10: error: redefinition of 'igt_x86_features' | unsigned igt_x86_features(void) | ^~~~~~~~~~~~~~~~ | In file included from ../../intel-gpu-tools-1.20/lib/igt_x86.c:38:0: | ../../intel-gpu-tools-1.20/lib/igt_x86.h:47:24: note: previous definition of 'igt_x86_features' was here | static inline unsigned igt_x86_features(void) | ^~~~~~~~~~~~~~~~ | ../../intel-gpu-tools-1.20/lib/igt_x86.c:148:7: error: redefinition of 'igt_x86_features_to_string' | char *igt_x86_features_to_string(unsigned features, char *line) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | In file included from ../../intel-gpu-tools-1.20/lib/igt_x86.c:38:0: | ../../intel-gpu-tools-1.20/lib/igt_x86.h:51:21: note: previous definition of 'igt_x86_features_to_string' was here | static inline char *igt_x86_features_to_string(unsigned features, char *line) I unfortunately missed this before merging the upgrade. Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Diffstat (limited to 'recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch')
-rw-r--r--recipes-graphics/intel-gpu-tools/intel-gpu-tools/0001-lib-Fix-compilation-on-non-x86.patch82
1 files changed, 82 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