diff options
author | Victor Kamensky <kamensky@cisco.com> | 2018-04-05 11:25:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-07 11:44:50 +0100 |
commit | 77f69397e02826d3ac9ad69285bca6bc2b56d85c (patch) | |
tree | d07ccec0ef0eecf2aef5dce747dfbf1d092be4e4 /meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch | |
parent | 7ca5822635e3123571fac7f99f5d6340274f84e9 (diff) | |
download | poky-77f69397e02826d3ac9ad69285bca6bc2b56d85c.tar.gz |
systemtap: support --sysroot option in variety of situations in cross build
For details on issues fixed please look at commit message of individual
patches.
Upstream-Status: Backport [systemtap@sourceware.org]
(From OE-Core rev: 5aa93de3a79c8691e74e982d3d4b0099b04f5555)
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch new file mode 100644 index 0000000000..c0ceb5a412 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-Added-a-couple-of-small-sysroot-fixes.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From a714658727206d2a98a7194b7e6d29dbd3e27b8d Mon Sep 17 00:00:00 2001 | ||
2 | From: David Smith <dsmith@redhat.com> | ||
3 | Date: Mon, 19 Mar 2018 16:50:05 -0500 | ||
4 | Subject: [PATCH] Added a couple of small sysroot fixes. | ||
5 | |||
6 | * tapsets.cxx (dwarf_builder::build): Fix commit 4ffecddf5. | ||
7 | (path_remove_sysroot): Fix extra '/' present at start of paths. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | Signed-off-by: Victor Kamensky <kamensky@cisco.com> | ||
11 | --- | ||
12 | tapsets.cxx | 10 +++++++--- | ||
13 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
14 | |||
15 | Index: git/tapsets.cxx | ||
16 | =================================================================== | ||
17 | --- git.orig/tapsets.cxx | ||
18 | +++ git/tapsets.cxx | ||
19 | @@ -1395,7 +1395,8 @@ string path_remove_sysroot(const systemt | ||
20 | string retval = path; | ||
21 | if (!sess.sysroot.empty() && | ||
22 | (pos = retval.find(sess.sysroot)) != string::npos) | ||
23 | - retval.replace(pos, sess.sysroot.length(), "/"); | ||
24 | + retval.replace(pos, sess.sysroot.length(), | ||
25 | + (sess.sysroot.back() == '/' ? "/": "")); | ||
26 | return retval; | ||
27 | } | ||
28 | |||
29 | @@ -8412,8 +8413,11 @@ dwarf_builder::build(systemtap_session & | ||
30 | |||
31 | // PR13338: unquote glob results | ||
32 | module_name = unescape_glob_chars (module_name); | ||
33 | - user_path = find_executable (module_name, "", sess.sysenv); // canonicalize it | ||
34 | - if (!is_fully_resolved(user_path, sess.sysroot, sess.sysenv)) | ||
35 | + user_path = find_executable (module_name, sess.sysroot, sess.sysenv); // canonicalize it | ||
36 | + // Note we don't need to pass the sysroot to | ||
37 | + // is_fully_resolved(), since we just passed it to | ||
38 | + // find_executable(). | ||
39 | + if (!is_fully_resolved(user_path, "", sess.sysenv)) | ||
40 | throw SEMANTIC_ERROR(_F("cannot find executable '%s'", | ||
41 | user_path.to_string().c_str())); | ||
42 | |||