summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-18 11:38:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-03 09:53:49 +0100
commit66d56fd242a3a5d52bf71b31eabc84e8ae1ab8f8 (patch)
tree180db8d6302ff2b98714cbe2d8442015ae5a58a3 /meta
parentc9a58aa355c79bffc0416bcab6ecab0baa336141 (diff)
downloadpoky-66d56fd242a3a5d52bf71b31eabc84e8ae1ab8f8.tar.gz
uninative: Set the dynamic linker to use at compile time
Its possible some dynamic runtime library in the dependency chain may come from sstate and link to libraries which need the libc from uninative. If we don't do this and binaries are run at do_install time they would fail to find the symbols from the later libc. Examples: cmake-native do_install: bin/cmake: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by TOPDIR/tmp/work/x86_64-linux/cmake-native/3.10.3-r0/recipe-sysroot-native/usr/lib/libexpat.so.1) dbus-native do_install: tmp/work/x86_64-linux/dbus-native/1.12.2-r0/build/bus/.libs/lt-dbus-daemon: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x32/build/build/tmp/work/x86_64-linux/dbus-native/1.12.2-r0/recipe-sysroot-native/usr/lib/libexpat.so.1) This issue is resolved when the interpreter is changed at sstate unpack time but this isn't soon enough to avoid issues at compile/install time. By specifing which dynamic linker/loader to use at compile time, this race window is removed entirely. (From OE-Core rev: 35867ee035030ab76fc9ccdb0eb1c3f80126301c) (From OE-Core rev: cead3c4925d39f8adc328007d8a8c1b23cc72842) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/uninative.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 23c5314818..de2221a365 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -129,8 +129,9 @@ def enable_uninative(d):
129 d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d)) 129 d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
130 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp") 130 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
131 d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp") 131 d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
132 d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined") 132 d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
133 d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined") 133 d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
134 d.appendVarFlag("BUILD_LDFLAGS", "vardepsexclude", "UNINATIVE_LOADER")
134 d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:") 135 d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
135 136
136python uninative_changeinterp () { 137python uninative_changeinterp () {