aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-02-15 17:01:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-16 09:04:22 +0000
commit73e53e453ecfe3565720c7201b8c0b3fc92759cd (patch)
tree0d85d527d9a42a39e0a8d03357031a1f35613f5a /meta
parent6e4e9f7856389cb711e3cb587625c55b0ee51fac (diff)
downloadopenembedded-core-contrib-73e53e453ecfe3565720c7201b8c0b3fc92759cd.tar.gz
nss: define RPATH variable for nss-native
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] (From OE-Core rev: f78664219503cc176ca1c10a4397ca8a2883eb71) 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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/nss/nss_3.21.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-support/nss/nss_3.21.bb b/meta/recipes-support/nss/nss_3.21.bb
index 552fd6c77d..d2e24112de 100644
--- a/meta/recipes-support/nss/nss_3.21.bb
+++ b/meta/recipes-support/nss/nss_3.21.bb
@@ -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}"
}