summaryrefslogtreecommitdiff
path: root/scripts/build/libc/uClibc.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/uClibc.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/uClibc.sh')
-rw-r--r--scripts/build/libc/uClibc.sh34
1 files changed, 15 insertions, 19 deletions
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index eb6cf5b..ed2ea90 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -2,30 +2,23 @@
# Copyright 2007 Yann E. MORIN
# Licensed under the GPL v2. See COPYING in the root of this package
-# Download uClibc
-do_libc_get() {
- CT_Fetch UCLIBC
-}
-
-# Extract uClibc
-do_libc_extract() {
- CT_ExtractPatch UCLIBC
-}
-
# Build and install headers and start files
-do_libc_start_files() {
+uclibc_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
+ uclibc_backend libc_mode=startfiles
}
# This function builds and install the full C library
-do_libc() {
- do_libc_backend libc_mode=final
+uclibc_main()
+{
+ uclibc_backend libc_mode=final
}
# Common backend for 1st and 2nd passes.
-do_libc_backend() {
+uclibc_backend()
+{
local libc_mode
local arg
@@ -40,13 +33,14 @@ 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 uclibc_backend_once multilib libc_mode="${libc_mode}"
CT_Popd
CT_EndStep
}
# Common backend for 1st and 2nd passes, once per multilib.
-do_libc_backend_once() {
+uclibc_backend_once()
+{
local libc_mode
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count
local multilib_dir startfiles_dir
@@ -215,7 +209,8 @@ do_libc_backend_once() {
# Initialises the .config file to sensible values
# $1: original file
# $2: modified file
-manage_uClibc_config() {
+manage_uClibc_config()
+{
src="$1"
dst="$2"
flags="$3"
@@ -408,7 +403,8 @@ manage_uClibc_config() {
CT_DoArchUClibcCflags "${dst}" "${flags}"
}
-do_libc_post_cc() {
+uclibc_post_cc()
+{
# uClibc and GCC disagree where the dynamic linker lives. uClibc always
# places it in the MULTILIB_DIR, while gcc does that for *some* variants
# and expects it in /lib for the other. So, create a symlink from lib