summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-17 00:04:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-21 22:39:00 +0000
commit9b7daa66506fbecbd4abde05f9d61d8031b5444c (patch)
tree99e05ee2ab4afaef2ed78e67f29f60571a33ae36 /meta
parent4bae34fa920281189210a0fbb32eb8afa8375a73 (diff)
downloadpoky-9b7daa66506fbecbd4abde05f9d61d8031b5444c.tar.gz
linuxloader: Add get_musl_loader_arch function
get_musl_loader_arch returns the arch part of ldso for musl, this is used in get_musl_loader() as well as independently usable, which is needed for multilib support in musl. Musl stores all ldso in /lib be it multilib or not, therefore do not use base_libdir instead directly use /lib [YOCTO #11971] (From OE-Core rev: 0b694592c417c1d21913905f5032d300c9635866) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/linuxloader.bbclass29
1 files changed, 17 insertions, 12 deletions
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass
index e2876cec7a..ec0e0556dd 100644
--- a/meta/classes/linuxloader.bbclass
+++ b/meta/classes/linuxloader.bbclass
@@ -1,27 +1,31 @@
1def get_musl_loader(d): 1def get_musl_loader_arch(d):
2 import re 2 import re
3 dynamic_loader = None 3 ldso_arch = None
4 4
5 targetarch = d.getVar("TARGET_ARCH") 5 targetarch = d.getVar("TARGET_ARCH")
6 if targetarch.startswith("microblaze"): 6 if targetarch.startswith("microblaze"):
7 dynamic_loader = "${base_libdir}/ld-musl-microblaze${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el' ,d)}.so.1" 7 ldso_arch = "microblaze${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el' ,d)}"
8 elif targetarch.startswith("mips"): 8 elif targetarch.startswith("mips"):
9 dynamic_loader = "${base_libdir}/ld-musl-mips${ABIEXTENSION}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1" 9 ldso_arch = "mips${ABIEXTENSION}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}"
10 elif targetarch == "powerpc": 10 elif targetarch == "powerpc":
11 dynamic_loader = "${base_libdir}/ld-musl-powerpc${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1" 11 ldso_arch = "powerpc${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}"
12 elif targetarch == "powerpc64": 12 elif targetarch == "powerpc64":
13 dynamic_loader = "${base_libdir}/ld-musl-powerpc64.so.1" 13 ldso_arch = "powerpc64"
14 elif targetarch == "x86_64": 14 elif targetarch == "x86_64":
15 dynamic_loader = "${base_libdir}/ld-musl-x86_64.so.1" 15 ldso_arch = "x86_64"
16 elif re.search("i.86", targetarch): 16 elif re.search("i.86", targetarch):
17 dynamic_loader = "${base_libdir}/ld-musl-i386.so.1" 17 ldso_arch = "i386"
18 elif targetarch.startswith("arm"): 18 elif targetarch.startswith("arm"):
19 dynamic_loader = "${base_libdir}/ld-musl-arm${ARMPKGSFX_ENDIAN}${ARMPKGSFX_EABI}.so.1" 19 ldso_arch = "arm${ARMPKGSFX_ENDIAN}${ARMPKGSFX_EABI}"
20 elif targetarch.startswith("aarch64"): 20 elif targetarch.startswith("aarch64"):
21 dynamic_loader = "${base_libdir}/ld-musl-aarch64${ARMPKGSFX_ENDIAN_64}.so.1" 21 ldso_arch = "aarch64${ARMPKGSFX_ENDIAN_64}"
22 elif targetarch.startswith("riscv64"): 22 elif targetarch.startswith("riscv64"):
23 dynamic_loader = "${base_libdir}/ld-musl-riscv64${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1" 23 ldso_arch = "riscv64${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}"
24 return dynamic_loader 24 return ldso_arch
25
26def get_musl_loader(d):
27 import re
28 return "/lib/ld-musl-" + get_musl_loader_arch(d) + ".so.1"
25 29
26def get_glibc_loader(d): 30def get_glibc_loader(d):
27 import re 31 import re
@@ -62,4 +66,5 @@ def get_linuxloader(d):
62 66
63get_linuxloader[vardepvalue] = "${@get_linuxloader(d)}" 67get_linuxloader[vardepvalue] = "${@get_linuxloader(d)}"
64get_musl_loader[vardepvalue] = "${@get_musl_loader(d)}" 68get_musl_loader[vardepvalue] = "${@get_musl_loader(d)}"
69get_musl_loader_arch[vardepvalue] = "${@get_musl_loader_arch(d)}"
65get_glibc_loader[vardepvalue] = "${@get_glibc_loader(d)}" 70get_glibc_loader[vardepvalue] = "${@get_glibc_loader(d)}"