Skip to contentSkip to conversation

chrpath.bbclass: Account for case when ORIGIN is in RPATH

PATCH Applied Khem Raj 2 participants 2 messages Aug 11, 2012 – Aug 17, 2012

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 chrpath.bbclass: Account for case when ORIGIN is in RPATH

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

---
 meta/classes/chrpath.bbclass |    1 +
 1 file changed, 1 insertion(+)
meta/classes/chrpath.bbclass +1 -0
index 10b5ca0..e903b65 100644
@@ -49,6 +49,7 @@ def process_dir (directory, d):
             new_rpaths = []
             for rpath in rpaths:
                 # If rpath is already dynamic continue
+                new_rpaths.append("%s" % (rpath.strip()))
                 if rpath.find("$ORIGIN") != -1:
                     continue
                 # If the rpath shares a root with base_prefix determine a new dynamic rpath from the
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 25 lines · Khem Raj

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

---
  meta/classes/chrpath.bbclass |    1 +
  1 file changed, 1 insertion(+)
meta/classes/chrpath.bbclass +0 -0
index 10b5ca0..e903b65 100644

meta/classes/chrpath.bbclass def process_dir (directory, d): · line 55

Quoted 7 lines
meta/classes/chrpath.bbclass +1 -0
@@ -49,6 +49,7 @@ def process_dir (directory, d):
              new_rpaths = []
              for rpath in rpaths:
                  # If rpath is already dynamic continue
+                new_rpaths.append("%s" % (rpath.strip()))
                  if rpath.find("$ORIGIN") != -1:
                      continue
                  # If the rpath shares a root with base_prefix determine a new dynamic rpath from the

Merged into OE-Core

Thanks
Sau!