package.bbclass: change RPATHs for nativesdk packages
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 31 Jul 2012 08:49:38 +0000 (11:49 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Aug 2012 14:28:39 +0000 (15:28 +0100)
Change binaries RPATHs, to include $ORIGIN, to make them relocatable.

(From OE-Core rev: f6362c5248914485fc8bf3c3f0ca6cc962bf753e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 3aaf999..4be2fc2 100644 (file)
@@ -40,6 +40,7 @@
 
 inherit packagedata
 inherit prserv
+inherit chrpath
 
 PKGD    = "${WORKDIR}/package"
 PKGDEST = "${WORKDIR}/packages-split"
@@ -444,6 +445,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