diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-22 14:51:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-23 17:58:59 +0100 |
commit | 14dfb7ea59e61cef998ff6eed367e057847d2aca (patch) | |
tree | 609999a6b0362d0f92e1d909ecb21d46e5bfa87a /meta | |
parent | 516697bed676a4567a4ff93022b9ac592648619a (diff) | |
download | poky-14dfb7ea59e61cef998ff6eed367e057847d2aca.tar.gz |
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.
(From OE-Core rev: 46a6da24b51426bedd9af8a2d63b2992b9d3fa5a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/glibc/glibc-ld.inc | 35 |
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 @@ | |||
1 | def ld_append_if_tune_exists(d, infos, dict): | 1 | inherit linuxloader |
2 | tune = d.getVar("DEFAULTTUNE") or "" | ||
3 | libdir = d.getVar("base_libdir") or "" | ||
4 | if tune in dict: | ||
5 | infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }') | ||
6 | infos['lddrewrite'].add(libdir+'/'+dict[tune][0]) | ||
7 | 2 | ||
8 | def glibc_dl_info(d): | 3 | def ld_append_if_tune_exists(d, infos): |
9 | ld_info_all = { | 4 | loader = get_linuxloader(d) |
10 | "mipsarch": ["ld.so.1", "FLAG_ELF_LIBC6"], | 5 | if loader: |
11 | "mipsarchr6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"], | 6 | infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }') |
12 | "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"], | 7 | infos['lddrewrite'].add(loader) |
13 | "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], | ||
14 | "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"], | ||
15 | "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"], | ||
16 | "core2-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], | ||
17 | "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], | ||
18 | "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], | ||
19 | "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], | ||
20 | "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], | ||
21 | "corei7-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], | ||
22 | "corei7-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], | ||
23 | } | ||
24 | 8 | ||
9 | def glibc_dl_info(d): | ||
25 | infos = {'ldconfig':set(), 'lddrewrite':set()} | 10 | infos = {'ldconfig':set(), 'lddrewrite':set()} |
26 | ld_append_if_tune_exists(d, infos, ld_info_all) | 11 | ld_append_if_tune_exists(d, infos) |
27 | 12 | ||
28 | #DEFAULTTUNE_MULTILIB_ORIGINAL | 13 | #DEFAULTTUNE_MULTILIB_ORIGINAL |
29 | original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL") | 14 | original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL") |
30 | if original_tune: | 15 | if original_tune: |
31 | localdata = bb.data.createCopy(d) | 16 | localdata = bb.data.createCopy(d) |
32 | localdata.setVar("DEFAULTTUNE", original_tune) | 17 | localdata.setVar("DEFAULTTUNE", original_tune) |
33 | ld_append_if_tune_exists(localdata, infos, ld_info_all) | 18 | ld_append_if_tune_exists(localdata, infos) |
34 | 19 | ||
35 | variants = d.getVar("MULTILIB_VARIANTS") or "" | 20 | variants = d.getVar("MULTILIB_VARIANTS") or "" |
36 | for item in variants.split(): | 21 | for item in variants.split(): |
37 | localdata = bb.data.createCopy(d) | 22 | localdata = bb.data.createCopy(d) |
38 | overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item | 23 | overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item |
39 | localdata.setVar("OVERRIDES", overrides) | 24 | localdata.setVar("OVERRIDES", overrides) |
40 | ld_append_if_tune_exists(localdata, infos, ld_info_all) | 25 | ld_append_if_tune_exists(localdata, infos) |
41 | infos['ldconfig'] = ','.join(infos['ldconfig']) | 26 | infos['ldconfig'] = ','.join(infos['ldconfig']) |
42 | infos['lddrewrite'] = ' '.join(infos['lddrewrite']) | 27 | infos['lddrewrite'] = ' '.join(infos['lddrewrite']) |
43 | return infos | 28 | return infos |