summaryrefslogtreecommitdiff
path: root/scripts/build/libc/musl.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-11-24 06:14:07 (GMT)
committerAlexey Neyman <stilor@att.net>2018-12-01 18:10:51 (GMT)
commit40d5bf64408a0e103f8149f941ea50fbbb11dc91 (patch)
tree67532a4e3a2498ab5663bb400649ec847ced6ba7 /scripts/build/libc/musl.sh
parent172308cb1be5b23c816c19d0b9c84ba4910cbe80 (diff)
Add moxiebox as a choice for libc
This required some rework of the libc selection, as moxiebox is a layer on top of another libc - newlib. Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox needs from libcrypto is SHA256, and it already includes a standalone implementation of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use that implementation for the host binary, too. Also, automate collecting/printing the list of all packages in a given category (e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given category. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/libc/musl.sh')
-rw-r--r--scripts/build/libc/musl.sh28
1 files changed, 11 insertions, 17 deletions
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index 430fb8d..0a93d10 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -2,33 +2,27 @@
# Copyright 2013 Timo Teräs
# Licensed under the GPL v2. See COPYING in the root of this package
-do_libc_get() {
- CT_Fetch MUSL
-}
-
-do_libc_extract() {
- CT_ExtractPatch MUSL
-}
-
# Build and install headers and start files
-do_libc_start_files() {
+musl_start_files()
+{
# Start files and Headers should be configured the same way as the
# final libc, but built and installed differently.
- do_libc_backend libc_mode=startfiles
+ musl_backend libc_mode=startfiles
}
# This function builds and install the full C library
-do_libc() {
- do_libc_backend libc_mode=final
+musl_main()
+{
+ musl_backend libc_mode=final
}
-do_libc_post_cc() {
+musl_post_cc() {
# MUSL creates dynamic linker symlink with absolute path - which works on the
# target but not on the host. We want our cross-ldd tool to work.
CT_MultilibFixupLDSO
}
-do_libc_backend() {
+musl_backend() {
local libc_mode
local arg
@@ -43,16 +37,16 @@ do_libc_backend() {
esac
CT_mkdir_pushd "${CT_BUILD_DIR}/build-libc-${libc_mode}"
- CT_IterateMultilibs do_libc_backend_once multilib libc_mode="${libc_mode}"
+ CT_IterateMultilibs musl_backend_once multilib libc_mode="${libc_mode}"
CT_Popd
CT_EndStep
}
# This backend builds the C library
-# Usage: do_libc_backend param=value [...]
+# Usage: musl_backend param=value [...]
# Parameter : Definition : Type : Default
# libc_mode : 'startfiles' or 'final' : string : (none)
-do_libc_backend_once() {
+musl_backend_once() {
local libc_mode
local -a extra_cflags
local -a extra_config