diff options
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch b/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch new file mode 100644 index 0000000000..6fe7d4d1cf --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-sysroot-fix-short-release-r-option-handling-follow-u.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 7e11f129ff370ce5f39812ce2ae6ce40818a347f Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Kamensky <kamensky@cisco.com> | ||
3 | Date: Thu, 22 Mar 2018 16:02:02 -0500 | ||
4 | Subject: [PATCH] sysroot: fix short release -r option handling follow up | ||
5 | |||
6 | In case of sysroot set and short release -r option it does not make sense | ||
7 | to pass short release name into dwfl_linux_kernel_report_offline | ||
8 | function. This function is not aware about sysroot and it won't look for | ||
9 | kernel modules under sysroot directory. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Victor Kamensky <kamensky@cisco.com> | ||
13 | --- | ||
14 | setupdwfl.cxx | 10 +++++++++- | ||
15 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/setupdwfl.cxx b/setupdwfl.cxx | ||
18 | index c419afa..0cf5810 100644 | ||
19 | --- a/setupdwfl.cxx | ||
20 | +++ b/setupdwfl.cxx | ||
21 | @@ -367,7 +367,15 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s) | ||
22 | // hard-code this magic here. | ||
23 | string lib_path = s.sysroot + "/lib/modules/" + s.kernel_release + "/build"; | ||
24 | if (s.kernel_build_tree == lib_path) | ||
25 | - elfutils_kernel_path = s.kernel_release; | ||
26 | + { | ||
27 | + if (s.sysroot != "") | ||
28 | + // If we have sysroot set does not make sense to pass | ||
29 | + // short release to dwfl, it won't take a sysroot into | ||
30 | + // account. Let's construct full path in such case. | ||
31 | + elfutils_kernel_path = string(s.sysroot + "/lib/modules/" + s.kernel_release); | ||
32 | + else | ||
33 | + elfutils_kernel_path = s.kernel_release; | ||
34 | + } | ||
35 | else | ||
36 | elfutils_kernel_path = s.kernel_build_tree; | ||
37 | offline_modules_found = 0; | ||
38 | -- | ||
39 | 2.7.4 | ||
40 | |||