]> code.ossystems Code Review - openembedded-core.git/commitdiff
conf,recipes: Add new variable LINKER_HASH_STYLE
authorKhem Raj <raj.khem@gmail.com>
Tue, 16 Aug 2011 22:17:33 +0000 (15:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Sep 2011 10:47:22 +0000 (11:47 +0100)
LINKER_HASH_STYLE in OE is set to either 'sysv' or 'gnu'
depending upon processor architecture e.g. mips does not support
gnu hash style so is uses sysv

besides 'sysv' and 'gnu' third option is to set it to 'both' we do
not do that by default but user can still set it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/conf/bitbake.conf
meta/conf/distro/include/tcmode-default.inc

index 730439c3b49d48d00c4dd4ac2d687b2ee50ca523..618a57b602d656b03d5a17cd6bce08cff218ee84 100644 (file)
@@ -476,7 +476,14 @@ BUILDSDK_LDFLAGS = "-L${STAGING_LIBDIR} \
                     -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} \
                     -Wl,-rpath,${base_libdir} -Wl,-O1"
 
-TARGET_LINK_HASH_STYLE ??= ""
+LINKER_HASH_STYLE ??= "gnu"
+# mips does not support GNU hash style therefore we override
+LINKER_HASH_STYLE_mips = "sysv"
+LINKER_HASH_STYLE_mipsel = "sysv"
+LINKER_HASH_STYLE_mips64 = "sysv"
+LINKER_HASH_STYLE_mips64el = "sysv"
+TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('LINKER_HASH_STYLE', d, True) == 'gnu']}"
+
 export LDFLAGS = "${TARGET_LDFLAGS}"
 export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
 #export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
index 285721589363248e9141c580423db2853d9c37a6..86562bea86e7e8e298d7f71357b8cd91cafe9901 100644 (file)
@@ -63,5 +63,4 @@ PREFERRED_VERSION_gzip-native ?= "1.4"
 
 # Setup suitable toolchain flags
 require conf/distro/include/as-needed.inc
-TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH', d, True) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"