From d58f8bee79dddb9aa1b65a2ef1624ebf1b389a4e Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Fri, 15 Nov 2019 14:07:51 +0100 Subject: [PATCH] cmake: copy globals from libc_nano.a to z_libc_partition When building with NEWLIB_LIBC_NANO we need to copy the globals from libc_nano.a into application memory partition z_libc_partition, exactly as we do for libc.a globals. This is required so that these globals are accessible by nPRIV code, when building with user mode support. Signed-off-by: Ioannis Glaropoulos --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90e0d4f40b1..561a9469b76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1057,6 +1057,9 @@ if(CONFIG_USERSPACE) if(CONFIG_NEWLIB_LIBC) set(NEWLIB_PART -l libc.a z_libc_partition) endif() + if(CONFIG_NEWLIB_LIBC_NANO) + set(NEWLIB_PART -l libc_nano.a z_libc_partition) + endif() if(CONFIG_MBEDTLS) set(MBEDTLS_PART -l lib..__modules__crypto__mbedtls.a k_mbedtls_partition) endif()