diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-11-12 20:33:33 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-11-12 20:33:33 +0100 |
commit | cd44a76ab19f5235f215ccc330b6da7380a5c3c5 (patch) | |
tree | 4dae21a512e025478f2804cf2a8b4318ff81ef85 /community/intel-gpu-tools | |
parent | 7177dead00c35406ef063e51d7f7f9bea8dab37c (diff) | |
download | packages-cd44a76ab19f5235f215ccc330b6da7380a5c3c5.tar.xz |
community/intel-gpu-tools: packported from git fix for duplicate definition of igt_x86_features_to_string
Diffstat (limited to 'community/intel-gpu-tools')
-rw-r--r-- | community/intel-gpu-tools/4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch | 75 | ||||
-rw-r--r-- | community/intel-gpu-tools/PKGBUILD | 10 |
2 files changed, 85 insertions, 0 deletions
diff --git a/community/intel-gpu-tools/4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch b/community/intel-gpu-tools/4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch new file mode 100644 index 00000000..005cd115 --- /dev/null +++ b/community/intel-gpu-tools/4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch @@ -0,0 +1,75 @@ +From 4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d Mon Sep 17 00:00:00 2001 +From: Thierry Reding <treding@nvidia.com> +Date: Thu, 12 Oct 2017 10:33:37 +0200 +Subject: lib: Fix compilation on non-x86 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The meson build avoids the failure by excluding the igt_x86.c file from +the compilation. autotools being what they are don't support that in an +easy way, so just use the preprocessor to avoid the duplicate function +definitions. + +Since igt_x86.c will now be ignored for non-x86 builds, the meson work- +around can be removed. + +Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> +Signed-off-by: Thierry Reding <treding@nvidia.com> + +diff --git a/lib/igt_x86.c b/lib/igt_x86.c +index 0f0963c..0ed3c6f 100644 +--- a/lib/igt_x86.c ++++ b/lib/igt_x86.c +@@ -93,6 +93,7 @@ + + #define has_YMM 0x1 + ++#if defined(__x86_64__) || defined(__i386__) + unsigned igt_x86_features(void) + { + unsigned max = __get_cpuid_max(BASIC_CPUID, 0); +@@ -172,3 +173,4 @@ char *igt_x86_features_to_string(unsigned features, char *line) + + return ret; + } ++#endif +diff --git a/lib/igt_x86.h b/lib/igt_x86.h +index d6dcfa1..27b7f0f 100644 +--- a/lib/igt_x86.h ++++ b/lib/igt_x86.h +@@ -40,7 +40,7 @@ + #define AVX 0x80 + #define AVX2 0x100 + +-#if defined(__x86_64__) ++#if defined(__x86_64__) || defined(__i386__) + unsigned igt_x86_features(void); + char *igt_x86_features_to_string(unsigned features, char *line); + #else +diff --git a/lib/meson.build b/lib/meson.build +index b31c68e..ddf93ec 100644 +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -64,6 +64,7 @@ lib_sources = [ + 'igt_syncobj.c', + 'igt_sysfs.c', + 'igt_vgem.c', ++ 'igt_x86.c', + 'instdone.c', + 'intel_batchbuffer.c', + 'intel_chipset.c', +@@ -96,10 +97,6 @@ lib_sources = [ + 'igt_kmod.c', + ] + +-if ['x86', 'x86_64'].contains(host_machine.cpu_family()) +- lib_sources += 'igt_x86.c' +-endif +- + lib_deps = [ + cairo, + glib, +-- +cgit v0.10.2 + diff --git a/community/intel-gpu-tools/PKGBUILD b/community/intel-gpu-tools/PKGBUILD new file mode 100644 index 00000000..0bb6286d --- /dev/null +++ b/community/intel-gpu-tools/PKGBUILD @@ -0,0 +1,10 @@ +# see upstream git +# https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/patch/?id=4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d + +source+=('4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch') +md5sums+=('95b06382361f96e43db9547a256a51d2') + +prepare( ) { + cd $pkgname-$pkgver + patch -Np1 -i "$srcdir/4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d.patch" +} |