diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2017-07-06 13:50:31 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-08 13:34:46 +0100 |
commit | 59ec03c5bc27e167eed957ba95b9a364612903b2 (patch) | |
tree | 2d6d972621359607c1384600b45ca7fda038557a /meta | |
parent | 85a891e8e76f620870ab69074b446a87c0055881 (diff) | |
download | poky-59ec03c5bc27e167eed957ba95b9a364612903b2.tar.gz |
linuxloader.bbclass: add musl libc support
Current linuxloader.bbclass does not support musl libc ldso, so add it
in.
After changing, now the linuxloader function will call a subfunction
according to which virtual/libc is being used, glibc or musl, the
linuxloader_musl function is made on top of the LDSO macro defined
in musl source, by mapping related OE variables to it.
Change tested on following machines:
"genericx86"
"genericx86-64"
"beaglebone"
"qemumips64"
"qemuarm64"
"mpc8315e-rdb"
"edgerouter"
"qemumips"
"kc705-microblazeel" - meta-xilinx
"qemuppc"
(From OE-Core rev: 5d4acaed81a811912e60d85c507bee819623369e)
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/linuxloader.bbclass | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass index 117b030746..8f30eb32e7 100644 --- a/meta/classes/linuxloader.bbclass +++ b/meta/classes/linuxloader.bbclass | |||
@@ -1,5 +1,8 @@ | |||
1 | LDSO_TCLIBC = "glibc" | ||
2 | LDSO_TCLIBC_libc-musl = "musl" | ||
3 | LDSO_TCLIBC_libc-baremetal = "musl" | ||
1 | 4 | ||
2 | linuxloader () { | 5 | linuxloader_glibc () { |
3 | case ${TARGET_ARCH} in | 6 | case ${TARGET_ARCH} in |
4 | powerpc | microblaze ) | 7 | powerpc | microblaze ) |
5 | dynamic_loader="${base_libdir}/ld.so.1" | 8 | dynamic_loader="${base_libdir}/ld.so.1" |
@@ -28,3 +31,40 @@ linuxloader () { | |||
28 | esac | 31 | esac |
29 | echo $dynamic_loader | 32 | echo $dynamic_loader |
30 | } | 33 | } |
34 | |||
35 | linuxloader_musl () { | ||
36 | case ${TARGET_ARCH} in | ||
37 | microblaze* ) | ||
38 | dynamic_loader="${base_libdir}/ld-musl-microblaze${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el' ,d)}.so.1" | ||
39 | ;; | ||
40 | mips* ) | ||
41 | dynamic_loader="${base_libdir}/ld-musl-mips${ABIEXTENSION}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1" | ||
42 | ;; | ||
43 | powerpc ) | ||
44 | dynamic_loader="${base_libdir}/ld-musl-powerpc${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}.so.1" | ||
45 | ;; | ||
46 | powerpc64 ) | ||
47 | dynamic_loader="${base_libdir}/ld-musl-powerpc64.so.1" | ||
48 | ;; | ||
49 | x86_64 ) | ||
50 | dynamic_loader="${base_libdir}/ld-musl-x86_64.so.1" | ||
51 | ;; | ||
52 | i*86 ) | ||
53 | dynamic_loader="${base_libdir}/ld-musl-i386.so.1" | ||
54 | ;; | ||
55 | arm* ) | ||
56 | dynamic_loader="${base_libdir}/ld-musl-arm${ARMPKGSFX_ENDIAN}${ARMPKGSFX_EABI}.so.1" | ||
57 | ;; | ||
58 | aarch64* ) | ||
59 | dynamic_loader="${base_libdir}/ld-musl-aarch64${ARMPKGSFX_ENDIAN_64}.so.1" | ||
60 | ;; | ||
61 | * ) | ||
62 | dynamic_loader="/unknown_dynamic_linker" | ||
63 | ;; | ||
64 | esac | ||
65 | echo $dynamic_loader | ||
66 | } | ||
67 | |||
68 | linuxloader () { | ||
69 | linuxloader_${LDSO_TCLIBC} | ||
70 | } | ||