diff options
author | Joakim Nohlgård <joakim@nohlgard.se> | 2022-11-30 01:09:14 +0100 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2023-03-08 16:54:12 +1300 |
commit | 1a362b560768453ac2745abf7a889e7fc423f3da (patch) | |
tree | 19f7c3fb7f3130f5214cbd03252087f3b0f47b66 /scripts/build/libc | |
parent | 9e13e83068afbc3b93728fa4512d8c199617be03 (diff) | |
download | crosstool-ng-1a362b560768453ac2745abf7a889e7fc423f3da.tar.gz crosstool-ng-1a362b560768453ac2745abf7a889e7fc423f3da.tar.bz2 crosstool-ng-1a362b560768453ac2745abf7a889e7fc423f3da.zip |
picolibc: Add configuration to select picolibc as the system libc
This moves the picolibc configuration values under C-library -> picolibc
so that they will be more easily discovered.
Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
Diffstat (limited to 'scripts/build/libc')
-rw-r--r-- | scripts/build/libc/picolibc.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/build/libc/picolibc.sh b/scripts/build/libc/picolibc.sh new file mode 100644 index 00000000..7e71c29b --- /dev/null +++ b/scripts/build/libc/picolibc.sh @@ -0,0 +1,29 @@ +# This file adds functions to use the Picolibc library as the system libc +# Copyright © 2022 Joakim Nohlgård +# Licensed under the GPL v2 or later. See COPYING in the root of this package + +picolibc_get() +{ + CT_Fetch PICOLIBC +} + +picolibc_extract() +{ + CT_ExtractPatch PICOLIBC +} + +picolibc_headers() +{ + CT_DoStep INFO "Installing C library headers" + CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/picolibc/newlib/libc/include/." "${CT_HEADERS_DIR}" + CT_EndStep +} + +picolibc_main() +{ + CT_DoStep INFO "Installing C library" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-libc" + do_picolibc_common_install + CT_Popd + CT_EndStep +} |