From patchwork Thu Aug 16 03:15:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH Date: Thu, 16 Aug 2012 03:15:46 -0000 From: Khem Raj X-Patchwork-Id: 34685 Message-Id: <1345086946-3715-1-git-send-email-raj.khem@gmail.com> To: openembedded-core@lists.openembedded.org This fixes a case when RPATH embedded in program have one of its path already relative to ORIGIN. We were losing that path if such a path existed. This patch appends it to the new edited rpath being created when we see it. so RPATH like below (RPATH) Library rpath: [$ORIGIN/../lib/amd64/jli:$ORIGIN/../jre/lib/amd64/jli] would end up being empty but after this patch its kept intact Signed-off-by: Khem Raj --- meta/classes/chrpath.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 10b5ca0..861d369 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass @@ -48,8 +48,9 @@ def process_dir (directory, d): rpaths = curr_rpath.split(":") new_rpaths = [] for rpath in rpaths: - # If rpath is already dynamic continue + # If rpath is already dynamic copy it to new_rpath and continue if rpath.find("$ORIGIN") != -1: + new_rpaths.append("%s" % (rpath.strip())) continue # If the rpath shares a root with base_prefix determine a new dynamic rpath from the # base_prefix shared root