summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2017-12-18 14:16:21 -0800
committerCalifornia Sullivan <california.l.sullivan@intel.com>2017-12-18 14:20:01 -0800
commitf0a462b71ff11089c6449b62cc4b415ae1568897 (patch)
treea3d2326eccc88827abc9f0ab894e4c6d75927e31 /recipes-kernel
parent2821e296a32e524d1fb4319d13a447d6ff6028e0 (diff)
downloadmeta-intel-f0a462b71ff11089c6449b62cc4b415ae1568897.tar.gz
linux-intel/4.14: Fix 32-bit perf issue
Perf fails to compile for 32-bit without this patch. I have requested for Bruce to submit it upstream. Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch41
-rw-r--r--recipes-kernel/linux/linux-intel_4.14.bb3
2 files changed, 44 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch b/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch
new file mode 100644
index 00000000..5c8b27c7
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch
@@ -0,0 +1,41 @@
1From 57af599929263e7bb6f2f369c9e4bc1e440528a9 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 21 Aug 2017 13:52:53 -0400
4Subject: [PATCH 1/1] perf: x86-32: explicitly include <errno.h>
5
6Upstream-Status: submitted
7
8The 32bit x86 perf build does not find the system definitions of error
9return values, hence we end up with:
10
11| In file included from util/libunwind/x86_32.c:32:0:
12| util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id':
13| util/libunwind/../../arch/x86/util/unwind-libunwind.c:109:11: error: 'EINVAL' undeclared (first use in this function); did you mean 'UNW_EINVAL'?
14| return -EINVAL;
15| ^~~~~~
16| UNW_EINVAL
17
18By explicitly including errno.h, we can fix this build without impacting
19other architectures.
20
21Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
22---
23
24 tools/perf/util/libunwind/x86_32.c | 1 +
25 1 file changed, 1 insertion(+)
26
27diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c
28index 957ffff72428..d781f7bdeb88 100644
29--- a/tools/perf/util/libunwind/x86_32.c
30+++ b/tools/perf/util/libunwind/x86_32.c
31@@ -20,6 +20,7 @@
32 #define LIBUNWIND__ARCH_REG_IP PERF_REG_X86_IP
33 #define LIBUNWIND__ARCH_REG_SP PERF_REG_X86_SP
34
35+#include <errno.h>
36 #include "unwind.h"
37 #include "debug.h"
38 #include "libunwind-x86.h"
39--
402.14.3
41
diff --git a/recipes-kernel/linux/linux-intel_4.14.bb b/recipes-kernel/linux/linux-intel_4.14.bb
index 03bf15c3..dd44aa1f 100644
--- a/recipes-kernel/linux/linux-intel_4.14.bb
+++ b/recipes-kernel/linux/linux-intel_4.14.bb
@@ -3,6 +3,9 @@ require linux-intel.inc
3KBRANCH = "4.14/yocto/base" 3KBRANCH = "4.14/yocto/base"
4KMETA_BRANCH = "yocto-4.9" 4KMETA_BRANCH = "yocto-4.9"
5 5
6# Fix for 32-bit perf issue. Remove when patch is backported to 4.14.
7SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch"
8
6LINUX_VERSION ?= "4.14.0" 9LINUX_VERSION ?= "4.14.0"
7SRCREV_machine ?= "bebc6082da0a9f5d47a1ea2edc099bf671058bd4" 10SRCREV_machine ?= "bebc6082da0a9f5d47a1ea2edc099bf671058bd4"
8SRCREV_meta ?= "f4e37e151102d89c4d0e110c88eb3b3c36bdeaa4" 11SRCREV_meta ?= "f4e37e151102d89c4d0e110c88eb3b3c36bdeaa4"