From patchwork Sat Mar 24 11:09:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: relocatable.bbclass: do not erease already existing ORIGIN paths and sanity resulting rpath Date: Sat, 24 Mar 2012 11:09:42 -0000 From: Henning Heinold X-Patchwork-Id: 24461 Message-Id: <1332587383-23633-2-git-send-email-heinold@inf.fu-berlin.de> To: openembedded-core@lists.openembedded.org * let already exisiting ORIGIN path stay in the binary otherwise binaries will not find there libs in directories besides the standard defined directories * remove all whitespaces from the resulting path Signed-off-by: Henning Heinold --- meta/classes/relocatable.bbclass | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass index 072f533..dff12ed 100644 --- a/meta/classes/relocatable.bbclass +++ b/meta/classes/relocatable.bbclass @@ -6,6 +6,7 @@ PREPROCESS_RELOCATE_DIRS ?= "" def process_dir (directory, d): import subprocess as sub import stat + import re cmd = d.expand('${CHRPATH_BIN}') tmpdir = d.getVar('TMPDIR') @@ -52,6 +53,7 @@ def process_dir (directory, d): for rpath in rpaths: # If rpath is already dynamic continue if rpath.find("$ORIGIN") != -1: + new_rpaths.append(rpath) continue # If the rpath shares a root with base_prefix determine a new dynamic rpath from the # base_prefix shared root @@ -75,6 +77,7 @@ def process_dir (directory, d): # if we have modified some rpaths call chrpath to update the binary if len(new_rpaths): args = ":".join(new_rpaths) + args = re.sub(r'\s', '', args) #bb.note("Setting rpath for %s to %s" %(fpath, args)) sub.call([cmd, '-r', args, fpath])