summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-22 14:51:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-23 09:24:31 +0100
commit46a6da24b51426bedd9af8a2d63b2992b9d3fa5a (patch)
treee4b7824467d95c61b5899e7d9c3a75a4c61d8d27
parent73fab4ede12d8ae31be72b5cb4ab29d7ef7dae17 (diff)
downloadopenembedded-core-contrib-46a6da24b51426bedd9af8a2d63b2992b9d3fa5a.tar.gz
openembedded-core-contrib-46a6da24b51426bedd9af8a2d63b2992b9d3fa5a.tar.bz2
openembedded-core-contrib-46a6da24b51426bedd9af8a2d63b2992b9d3fa5a.zip
glibc: Improve ldd loader specification
Currently if a tune isn't specified in the table, the loader defaults for the architecture are used which may or may not match our path specification. This leads to general confusion. Change the code to use the linuxloader class which works of architecture, not tune. This still isn't perfect as n32/x32 aren't covered but its an improvement to listing all tunes here. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc35
1 files changed, 10 insertions, 25 deletions
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
index c1d635dc8d..9b1d94a11e 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -1,43 +1,28 @@
-def ld_append_if_tune_exists(d, infos, dict):
- tune = d.getVar("DEFAULTTUNE") or ""
- libdir = d.getVar("base_libdir") or ""
- if tune in dict:
- infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
- infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
+inherit linuxloader
-def glibc_dl_info(d):
- ld_info_all = {
- "mipsarch": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "mipsarchr6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
- "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
- "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
- "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"],
- "core2-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "corei7-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
- "corei7-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
- }
+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)
+def glibc_dl_info(d):
infos = {'ldconfig':set(), 'lddrewrite':set()}
- ld_append_if_tune_exists(d, infos, ld_info_all)
+ 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, ld_info_all)
+ ld_append_if_tune_exists(localdata, infos)
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, ld_info_all)
+ ld_append_if_tune_exists(localdata, infos)
infos['ldconfig'] = ','.join(infos['ldconfig'])
infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
return infos