From 99906d4260846df4c66e06472b62a2d0d89aa199 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Oct 2021 11:05:50 -0700 Subject: [PATCH] Build picolibc too To make C++ work, this requires patching the GCC headers that are built. This would have been done by crosstool-ng, but sdk-ng doesn't use a GCC version known to crosstool-ng, so none of the crosstool-ng patches are applied. Signed-off-by: Keith Packard --- configs/aarch64-zephyr-elf.config | 6 ++++++ configs/arc-zephyr-elf.config | 5 +++++ configs/arm-zephyr-eabi.config | 6 ++++++ configs/riscv64-zephyr-elf.config | 6 ++++++ 4 files changed, 23 insertions(+) diff --git a/configs/aarch64-zephyr-elf.config b/configs/aarch64-zephyr-elf.config index 495960ac..3567ac1e 100644 --- a/configs/aarch64-zephyr-elf.config +++ b/configs/aarch64-zephyr-elf.config @@ -60,3 +60,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_LIBC_PICOLIBC_SRC_CUSTOM=y +CT_LIBC_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_TARGET_CFLAGS="-ftls-model=local-exec" diff --git a/configs/arc-zephyr-elf.config b/configs/arc-zephyr-elf.config index 01a21cab..c1bf67c0 100644 --- a/configs/arc-zephyr-elf.config +++ b/configs/arc-zephyr-elf.config @@ -59,3 +59,8 @@ 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_LIBC_PICOLIBC_SRC_CUSTOM=y +CT_LIBC_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y diff --git a/configs/arm-zephyr-eabi.config b/configs/arm-zephyr-eabi.config index 1652457e..ca761e9f 100644 --- a/configs/arm-zephyr-eabi.config +++ b/configs/arm-zephyr-eabi.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_LIBC_PICOLIBC_SRC_CUSTOM=y +CT_LIBC_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_TARGET_CFLAGS="-ftls-model=local-exec" diff --git a/configs/riscv64-zephyr-elf.config b/configs/riscv64-zephyr-elf.config index 549fc790..20a48b51 100644 --- a/configs/riscv64-zephyr-elf.config +++ b/configs/riscv64-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_LIBC_PICOLIBC_SRC_CUSTOM=y +CT_LIBC_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_TARGET_CFLAGS="-ftls-model=local-exec"