[1/3] bitbake.conf: add --enable-new-dtags to linker

Submitted by Alexander Kanavin on Jan. 8, 2019, 3:25 p.m. | Patch ID: 157624

Details

Message ID 20190108152529.55111-1-alex.kanavin@gmail.com
State New
Headers show

Commit Message

Alexander Kanavin Jan. 8, 2019, 3:25 p.m.
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>
---
 meta/conf/bitbake.conf | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e64ce6a6dab..68700e9e7cb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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} \