summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-22 16:46:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-23 09:24:31 +0100
commit774219567987956fb7bbb50e64eb6cebef1efe5b (patch)
tree713e51a931796b1111d5ec9931329a21c6258a12 /meta/recipes-core/glibc
parent4e1dc858fbf671ef27089a2b9bcdc965fe19d698 (diff)
downloadopenembedded-core-contrib-774219567987956fb7bbb50e64eb6cebef1efe5b.tar.gz
openembedded-core-contrib-774219567987956fb7bbb50e64eb6cebef1efe5b.tar.bz2
openembedded-core-contrib-774219567987956fb7bbb50e64eb6cebef1efe5b.zip
glibc-ld: Simplify/cleanup multilib handling to use library functions
We have library functions to handle multilib variables/datastores, lets use them so we have good common functions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc23
1 files changed, 5 insertions, 18 deletions
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
index 9b1d94a11e..bb167b32bc 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -1,28 +1,15 @@
inherit linuxloader
-def ld_append_if_tune_exists(d, infos):
- loader = get_linuxloader(d)
- if loader:
- infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }')
- infos['lddrewrite'].add(loader)
+GLIBC_GETLOADER = "${@get_linuxloader(d)}"
def glibc_dl_info(d):
infos = {'ldconfig':set(), 'lddrewrite':set()}
- ld_append_if_tune_exists(d, infos)
- #DEFAULTTUNE_MULTILIB_ORIGINAL
- original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL")
- if original_tune:
- localdata = bb.data.createCopy(d)
- localdata.setVar("DEFAULTTUNE", original_tune)
- ld_append_if_tune_exists(localdata, infos)
+ loaders = all_multilib_tune_values(d, "GLIBC_GETLOADER").split()
+ for loader in loaders:
+ infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }')
+ infos['lddrewrite'].add(loader)
- variants = d.getVar("MULTILIB_VARIANTS") or ""
- for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- ld_append_if_tune_exists(localdata, infos)
infos['ldconfig'] = ','.join(infos['ldconfig'])
infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
return infos