From 7baed015b265809fe4e542206984bc4be228d614 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Oct 2021 11:05:50 -0700 Subject: [PATCH] Build picolibc for aarch64, arc, arc64, arm, mips, riscv, sparc and x86 This builds both picolibc and libstdc++ with picolibc support using the crosstool-ng support for those configurations. Still to do: xtensa (so many xtensa) Signed-off-by: Keith Packard fixup-configs --- configs/aarch64-zephyr-elf.config | 7 +++++++ configs/arc-zephyr-elf.config | 6 ++++++ configs/arc64-zephyr-elf.config | 6 ++++++ configs/arm-zephyr-eabi.config | 7 +++++++ configs/mips-zephyr-elf.config | 6 ++++++ configs/riscv64-zephyr-elf.config | 7 +++++++ configs/sparc-zephyr-elf.config | 6 ++++++ configs/x86_64-zephyr-elf.config | 6 ++++++ 8 files changed, 51 insertions(+) diff --git a/configs/aarch64-zephyr-elf.config b/configs/aarch64-zephyr-elf.config index 495960ac..faa8c105 100644 --- a/configs/aarch64-zephyr-elf.config +++ b/configs/aarch64-zephyr-elf.config @@ -60,3 +60,10 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" +CT_TARGET_CFLAGS="-ftls-model=local-exec" diff --git a/configs/arc-zephyr-elf.config b/configs/arc-zephyr-elf.config index 01a21cab..7bd20593 100644 --- a/configs/arc-zephyr-elf.config +++ b/configs/arc-zephyr-elf.config @@ -59,3 +59,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/arc64-zephyr-elf.config b/configs/arc64-zephyr-elf.config index 350cccf2..f1aa4576 100644 --- a/configs/arc64-zephyr-elf.config +++ b/configs/arc64-zephyr-elf.config @@ -61,3 +61,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/arm-zephyr-eabi.config b/configs/arm-zephyr-eabi.config index 1652457e..7573639d 100644 --- a/configs/arm-zephyr-eabi.config +++ b/configs/arm-zephyr-eabi.config @@ -61,3 +61,10 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" +CT_TARGET_CFLAGS="-ftls-model=local-exec" diff --git a/configs/mips-zephyr-elf.config b/configs/mips-zephyr-elf.config index 9642bca8..0b952ef9 100644 --- a/configs/mips-zephyr-elf.config +++ b/configs/mips-zephyr-elf.config @@ -59,3 +59,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/riscv64-zephyr-elf.config b/configs/riscv64-zephyr-elf.config index f9e853b1..b4b48a6c 100644 --- a/configs/riscv64-zephyr-elf.config +++ b/configs/riscv64-zephyr-elf.config @@ -61,3 +61,10 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" +CT_TARGET_CFLAGS="-ftls-model=local-exec" diff --git a/configs/sparc-zephyr-elf.config b/configs/sparc-zephyr-elf.config index 1554b1cb..a1f97c1e 100644 --- a/configs/sparc-zephyr-elf.config +++ b/configs/sparc-zephyr-elf.config @@ -58,3 +58,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/x86_64-zephyr-elf.config b/configs/x86_64-zephyr-elf.config index 8dd1d527..18087c8f 100644 --- a/configs/x86_64-zephyr-elf.config +++ b/configs/x86_64-zephyr-elf.config @@ -61,3 +61,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dsysroot-install=true -Dsysroot-install-skip-checks=true"