Skip to content

Commit 26590a0

Browse files
committed
picolibc: Enable dual-mode picolibc builds
This provides both minsize and release versions of picolibc in the SDK, allowing users to select between them while building their application. Signed-off-by: Keith Packard <[email protected]>
1 parent b9321a7 commit 26590a0

File tree

4 files changed

+3
-1
lines changed

4 files changed

+3
-1
lines changed

cmake/zephyr/generic.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ set(CROSS_COMPILE ${one_toolchain_root}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMP
3131
set(SYSROOT_DIR ${one_toolchain_root}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
3232
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
3333
set(TOOLCHAIN_HAS_PICOLIBC ON CACHE BOOL "True if toolchain supports picolibc")
34+
set(TOOLCHAIN_HAS_PICOLIBC_DUAL ON CACHE BOOL "True if toolchain supports --picolibc-buildtype=release")

configs/common.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ CT_COMP_LIBS_PICOLIBC=y
7171
CT_PICOLIBC_SRC_CUSTOM=y
7272
CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc"
7373
CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y
74+
CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTBOTH=y
7475
CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y
7576
CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true -Dassert-verbose=false"

contrib/linux_build_toolchain.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)