summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-08-16 15:17:33 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-28 11:47:22 +0100
commit17322dba8434e592d3922496f89f8d1d5598247e (patch)
tree2fef10d29a03e16dfd0356d87258d7e84b6e6ec4
parentbed68b561056e0f454c0bf527997f82b63122773 (diff)
downloadopenembedded-core-17322dba8434e592d3922496f89f8d1d5598247e.tar.gz
openembedded-core-17322dba8434e592d3922496f89f8d1d5598247e.tar.bz2
openembedded-core-17322dba8434e592d3922496f89f8d1d5598247e.tar.xz
openembedded-core-17322dba8434e592d3922496f89f8d1d5598247e.zip
conf,recipes: Add new variable LINKER_HASH_STYLE
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>
-rw-r--r--meta/conf/bitbake.conf9
-rw-r--r--meta/conf/distro/include/tcmode-default.inc1
2 files changed, 8 insertions, 2 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 730439c3b..618a57b60 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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} \
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 285721589..86562bea8 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -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']]}"