pseudo: Drop nativesdk wrapper and link against old memcpy symbol
The -nativesdk pseudo wrapper setting LD_LIBRARY_PATH turned out to be a bad idea since it can mix up different libc and lib-dl verisons which may or may not work depending on the phase of the moon. As an alternative to solving the original problem, this patch drops the symbol version requirement on memcpy which allows pseudo to work with libc's back to 2.7 which should be sufficient for our supported targets using nativesdk. [YOCTO #2299] [YOCTO #2351] (From OE-Core rev: c6c701f424aeb502d20ff02d02712e56f4e259a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ea3db01838
commit
604fc2adce
|
@ -0,0 +1,26 @@
|
|||
When running as pseudo-nativesdk, we might need to run host binaries
|
||||
linked against the host libc. Having a 2.14 libc dependency from memcpy is
|
||||
problematic so instruct the linker to use older symbols.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
RP 2012/4/22
|
||||
|
||||
Index: pseudo-1.3/pseudo.h
|
||||
===================================================================
|
||||
--- pseudo-1.3.orig/pseudo.h 2012-04-22 12:17:59.078909060 +0000
|
||||
+++ pseudo-1.3/pseudo.h 2012-04-22 12:32:42.954888587 +0000
|
||||
@@ -29,6 +29,13 @@
|
||||
int pseudo_set_value(const char *key, const char *value);
|
||||
char *pseudo_get_value(const char *key);
|
||||
|
||||
+#ifdef __amd64__
|
||||
+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.2.5")
|
||||
+#else
|
||||
+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.0")
|
||||
+#endif
|
||||
+GLIBC_COMPAT_SYMBOL(memcpy);
|
||||
+
|
||||
#include "pseudo_tables.h"
|
||||
|
||||
extern void pseudo_debug_verbose(void);
|
|
@ -9,6 +9,8 @@ SECTION = "base"
|
|||
LICENSE = "LGPL2.1"
|
||||
DEPENDS = "sqlite3"
|
||||
|
||||
SRC_URI_append_virtclass-nativesdk = " file://symver.patch"
|
||||
|
||||
FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
|
||||
FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
|
||||
PROVIDES += "virtual/fakeroot"
|
||||
|
@ -75,8 +77,6 @@ do_install_append_virtclass-nativesdk () {
|
|||
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
||||
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
||||
fi
|
||||
|
||||
create_wrapper ${D}${bindir}/pseudo LD_LIBRARY_PATH=${base_libdir}:${libdir}
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
|
Loading…
Reference in New Issue