Patchwork [v2,6/6] package.bbclass: change RPATHs for nativesdk packages

login
register
mail settings
Submitter Laurentiu Palcu
Date July 31, 2012, 8:49 a.m.
Message ID <0910381748d7d4a957a2d921736aac4f48279013.1343723990.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/33409/
State New
Headers show

Comments

Laurentiu Palcu - July 31, 2012, 8:49 a.m.
Change binaries RPATHs, to include $ORIGIN, to make them relocatable.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/classes/package.bbclass |    5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 6142911..fda8228 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -40,6 +40,7 @@ 
 
 inherit packagedata
 inherit prserv
+inherit chrpath
 
 PKGD    = "${WORKDIR}/package"
 PKGDEST = "${WORKDIR}/packages-split"
@@ -440,6 +441,10 @@  python perform_packagecopy () {
     subprocess.call('rm -rf %s/*' % (dvar), shell=True)
     # Preserve sparse files and hard links
     subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True)
+
+    # replace RPATHs for the nativesdk binaries, to make them relocatable
+    if bb.data.inherits_class('nativesdk', d):
+        rpath_replace (dvar, d)
 }
 
 # We generate a master list of directories to process, we start by