diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-22 16:46:52 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-23 17:58:59 +0100 |
| commit | 2988d730a3d469f9250222b1b7f3cae03dd17eba (patch) | |
| tree | 6d0812acf0d2b9c6ef6604244a7a1221ef5438b6 | |
| parent | 5875571f03edcff9c32daa821f4a2be04ff272a3 (diff) | |
| download | poky-2988d730a3d469f9250222b1b7f3cae03dd17eba.tar.gz | |
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.
(From OE-Core rev: 774219567987956fb7bbb50e64eb6cebef1efe5b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/glibc/glibc-ld.inc | 23 |
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 @@ | |||
| 1 | inherit linuxloader | 1 | inherit linuxloader |
| 2 | 2 | ||
| 3 | def ld_append_if_tune_exists(d, infos): | 3 | GLIBC_GETLOADER = "${@get_linuxloader(d)}" |
| 4 | loader = get_linuxloader(d) | ||
| 5 | if loader: | ||
| 6 | infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }') | ||
| 7 | infos['lddrewrite'].add(loader) | ||
| 8 | 4 | ||
| 9 | def glibc_dl_info(d): | 5 | def glibc_dl_info(d): |
| 10 | infos = {'ldconfig':set(), 'lddrewrite':set()} | 6 | infos = {'ldconfig':set(), 'lddrewrite':set()} |
| 11 | ld_append_if_tune_exists(d, infos) | ||
| 12 | 7 | ||
| 13 | #DEFAULTTUNE_MULTILIB_ORIGINAL | 8 | loaders = all_multilib_tune_values(d, "GLIBC_GETLOADER").split() |
| 14 | original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL") | 9 | for loader in loaders: |
| 15 | if original_tune: | 10 | infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }') |
| 16 | localdata = bb.data.createCopy(d) | 11 | infos['lddrewrite'].add(loader) |
| 17 | localdata.setVar("DEFAULTTUNE", original_tune) | ||
| 18 | ld_append_if_tune_exists(localdata, infos) | ||
| 19 | 12 | ||
| 20 | variants = d.getVar("MULTILIB_VARIANTS") or "" | ||
| 21 | for item in variants.split(): | ||
| 22 | localdata = bb.data.createCopy(d) | ||
| 23 | overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item | ||
| 24 | localdata.setVar("OVERRIDES", overrides) | ||
| 25 | ld_append_if_tune_exists(localdata, infos) | ||
| 26 | infos['ldconfig'] = ','.join(infos['ldconfig']) | 13 | infos['ldconfig'] = ','.join(infos['ldconfig']) |
| 27 | infos['lddrewrite'] = ' '.join(infos['lddrewrite']) | 14 | infos['lddrewrite'] = ' '.join(infos['lddrewrite']) |
| 28 | return infos | 15 | return infos |
