diff options
author | Alexey Neyman <stilor@att.net> | 2018-11-23 22:14:07 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-12-01 10:10:51 -0800 |
commit | 40d5bf64408a0e103f8149f941ea50fbbb11dc91 (patch) | |
tree | 67532a4e3a2498ab5663bb400649ec847ced6ba7 /scripts/build/libc.sh | |
parent | 172308cb1be5b23c816c19d0b9c84ba4910cbe80 (diff) | |
download | crosstool-ng-40d5bf64408a0e103f8149f941ea50fbbb11dc91.tar.gz crosstool-ng-40d5bf64408a0e103f8149f941ea50fbbb11dc91.tar.bz2 crosstool-ng-40d5bf64408a0e103f8149f941ea50fbbb11dc91.zip |
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.sh')
-rw-r--r-- | scripts/build/libc.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/scripts/build/libc.sh b/scripts/build/libc.sh new file mode 100644 index 00000000..fb1ebe54 --- /dev/null +++ b/scripts/build/libc.sh @@ -0,0 +1,39 @@ +# C library build routines. We don't invoke the corresponding functions directly +# because some of them build on top of another. E.g. moxiebox runtime requires +# newlib as a prerequisite. + +# Define default hooks - download/unpack just the main package; no-op build hooks. +# The actual implementation can override just what it needs then. +eval "${CT_LIBC//[^A-Za-z0-9]/_}_get() { CT_Fetch ${CT_LIBC_CHOICE_KSYM}; }" +eval "${CT_LIBC//[^A-Za-z0-9]/_}_extract() { CT_ExtractPatch ${CT_LIBC_CHOICE_KSYM}; }" +for _m in start_files main post_cc; do + eval "${CT_LIBC//[^A-Za-z0-9]/_}_${_m}() { :; }" +done + +# Source the selected libc. +. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" + +do_libc_get() +{ + eval "${CT_LIBC//[^A-Za-z0-9]/_}_get" +} + +do_libc_extract() +{ + eval "${CT_LIBC//[^A-Za-z0-9]/_}_extract" +} + +do_libc_start_files() +{ + eval "${CT_LIBC//[^A-Za-z0-9]/_}_start_files" +} + +do_libc_main() +{ + eval "${CT_LIBC//[^A-Za-z0-9]/_}_main" +} + +do_libc_post_cc() +{ + eval "${CT_LIBC//[^A-Za-z0-9]/_}_post_cc" +} |