]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
nss: define RPATH variable for nss-native
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 15 Feb 2016 15:01:49 +0000 (17:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Feb 2016 09:03:28 +0000 (09:03 +0000)
Otherwise the nss libs do not get any RPATH/RUNPATH. Consequently, the
.so dependencies of nss libs are always searched from the base lib
directories of the host (i.e. /lib/ and /usr/lib). This causes problems
with nss-native where the .so's should be searched from the base lib
directories of the sysroot instead of the host file system.

This particular problem has probably been unnoticed as most users are
likely to have nss libraries installed on their host system. In this
case everything most likely work as expected.

[YOCTO #9041]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/nss/nss_3.21.bb

index 552fd6c77dfe5a755c27604bbed7d57ed8500a9c..d2e24112de5d337ba99c97a4c747f5c4f46ee05d 100644 (file)
@@ -55,6 +55,11 @@ do_compile_prepend_class-nativesdk() {
     export LDFLAGS=""
 }
 
+do_compile_prepend_class-native() {
+    # Need to set RPATH so that chrpath will do its job correctly
+    RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
 do_compile() {
     export CROSS_COMPILE=1
     export NATIVE_CC="gcc"
@@ -96,7 +101,8 @@ do_compile() {
     #
     export CC="${CC} -g"
     make -C ./nss CCC="${CXX} -g" \
-        OS_TEST=${OS_TEST}
+        OS_TEST=${OS_TEST} \
+        RPATH="${RPATH}"
 }