summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-ld.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-ld.inc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-ld.inc56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-ld.inc b/meta/recipes-core/eglibc/eglibc-ld.inc
new file mode 100644
index 0000000..6261ae3
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-ld.inc
@@ -0,0 +1,56 @@
1def ld_append_if_tune_exists(d, infos, dict):
2 tune = d.getVar("DEFAULTTUNE", True) or ""
3 libdir = d.getVar("base_libdir", True) 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
8def eglibc_dl_info(d):
9 ld_info_all = {
10 "mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
11 "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
12 "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"],
13 "mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"],
14 "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
15 "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"],
16 "mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
17 "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
18 "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
19 "mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
20 "mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
21 "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
22 "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
23 "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
24 "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"],
25 "core2-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
26 "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
27 "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
28 "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
29 "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
30 "corei7-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
31 "corei7-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
32 }
33
34 infos = {'ldconfig':set(), 'lddrewrite':set()}
35 ld_append_if_tune_exists(d, infos, ld_info_all)
36
37 #DEFAULTTUNE_MULTILIB_ORIGINAL
38 original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL",True)
39 if original_tune:
40 localdata = bb.data.createCopy(d)
41 localdata.setVar("DEFAULTTUNE", original_tune)
42 ld_append_if_tune_exists(localdata, infos, ld_info_all)
43
44 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
45 for item in variants.split():
46 localdata = bb.data.createCopy(d)
47 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
48 localdata.setVar("OVERRIDES", overrides)
49 bb.data.update_data(localdata)
50 ld_append_if_tune_exists(localdata, infos, ld_info_all)
51 infos['ldconfig'] = ','.join(infos['ldconfig'])
52 infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
53 return infos
54
55EGLIBC_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}"
56RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"