aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/oprofile/oprofile/oparchive_fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/oprofile/oprofile/oparchive_fix.patch')
-rw-r--r--recipes/oprofile/oprofile/oparchive_fix.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/recipes/oprofile/oprofile/oparchive_fix.patch b/recipes/oprofile/oprofile/oparchive_fix.patch
new file mode 100644
index 0000000000..dbdd5eb4ea
--- /dev/null
+++ b/recipes/oprofile/oprofile/oparchive_fix.patch
@@ -0,0 +1,22 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(exe_name);
++ bfd * ibfd = open_bfd(options::archive_path + exe_name);
+ if (ibfd) {
+ string global(options::archive_path + DEBUGDIR);
+ string dirname = op_dirname(options::archive_path +
+@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec
+ /* found something copy it over */
+ string dest_debug_dir = options::outdirectory +
+ dirname + "/.debug/";
+- if (create_dir(dest_debug_dir.c_str())) {
++ if (!options::list_files && create_dir(dest_debug_dir.c_str())) {
+ cerr << "Unable to create directory: "
+ << dest_debug_dir << "." << endl;
+ exit (EXIT_FAILURE);