]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf: add --enable-new-dtags to linker
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 21 Dec 2018 14:23:51 +0000 (15:23 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Jan 2019 19:54:03 +0000 (19:54 +0000)
Various versions of ld have different defaults for this
(even between e.g. Ubuntu 16.04 and 18.04). This has the
consequence of putting either RPATH or RUNPATH into the binary,
depending on the linker, which have different priorities
vs LD_LIBRARY_PATH env var. Also, I think, the original
executable binary is looked up for the tags when resolving
a dependency of a shared library when using RPATH, but not
RUNPATH.

Let's make this deterministic.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/conf/bitbake.conf

index e64ce6a6dabcd0930bd9530e7d0c9e3909fe96ac..68700e9e7cb32b522dc0b3940297d1716e7b714c 100644 (file)
@@ -573,6 +573,7 @@ export TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
 
 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
                         -L${STAGING_BASE_LIBDIR_NATIVE} \
+                        -Wl,--enable-new-dtags \
                         -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
                         -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} \
                         -Wl,-rpath,${STAGING_LIBDIR_NATIVE} \