Squashed 'yocto-poky/' content from commit ea562de
git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
new file mode 100644
index 0000000..4ca9981
--- /dev/null
+++ b/meta/classes/relocatable.bbclass
@@ -0,0 +1,7 @@
+inherit chrpath
+
+SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess"
+
+python relocatable_binaries_preprocess() {
+ rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
+}