autotools.bbclass: Set the dynamic linker search path for libtool correctly

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.

(From OE-Core rev: 93e595d5c89ebacdb8d1e6fcfe6f58fe2d30de28)

(From OE-Core rev: 5e41e0973a9be890ac310e1bbf465fcd08b0add5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-09-23 08:57:31 +01:00
parent 64ba74deff
commit 9dcb176dc8
2 changed files with 5 additions and 0 deletions

View 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"

View 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}"