]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools.bbclass: Set the dynamic linker search path for libtool correctly
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Sep 2011 07:57:31 +0000 (08:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 26 Sep 2011 16:55:05 +0000 (17:55 +0100)
libtool obtains the search path from /etc/ld.so.conf and hardcodes /usr/lib
and /lib. This results in host contamination and variable sets of RPATH
values ending up in binaries.

By exporting the correct values for all autotools recipes we avoid this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass
meta/classes/native.bbclass

index 8f65b709fd52770196e938ce58ba6f3980e64bd6..f213c18bf50212c66a88b0dc52dfbb1640ce3f79 100644 (file)
@@ -31,6 +31,8 @@ export CONFIG_SITE = "${@siteinfo_get_files(d)}"
 acpaths = "default"
 EXTRA_AUTORECONF = "--exclude=autopoint"
 
+export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}"
+
 def autotools_set_crosscompiling(d):
        if not bb.data.inherits_class('native', d):
                return " cross_compiling=yes"
index 9a41f19dc65eb1c2a6eac5bd42fdd434b1a66335..5e45aed37b537a79e6af0693debeb38e036eb16f 100644 (file)
@@ -69,6 +69,9 @@ exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
 
 libdir = "${STAGING_DIR_NATIVE}${libdir_native}"
 
+# Libtool's default paths are correct for the native machine
+lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1"
+
 NATIVE_PACKAGE_PATH_SUFFIX = ""
 bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
 libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"