Commit graph

512 commits

Author SHA1 Message Date
David Schneider 012c9a2847 libc/picolibc: Support Picolibc for toolchains without bundled Picolibc
Allow Picolibc to get build from module, if the toolchain does not
include a bundled picolibc.
This should always be possible, except for native applications and
if libcpp is required.

Signed-off-by: David Schneider <david.schneider@chargepoint.com>
2024-05-09 10:28:35 +02:00
Patryk Duda 60d03c53e1 libc: minimal: Add 'noreturn' attribute to abort() and exit()
This aligns abort() and exit() definitions with other libc.

Without 'noreturn' attribute, compilers have to assume that we will
return from these functions which can lead to surprising errors like
'error: non-void function does not return a value'.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-05-06 17:32:17 +01:00
Alberto Escolar Piedras 60d5ce452e libC kconfig: Introduce a new option to avoid the native libC
Let's introduce a new option so components which cannot
be used with the native libC can select it.
And at this point let's already have POSIX_API select it
instead of being used in the libC choice default.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-24 09:53:36 +02:00
Christopher Friedt 0f23818153 posix: env: support for environ, getenv(), setenv(), unsetenv()
Support getting and setting POSIX environment variables.

Additionally, the thread-safe BSD variant getenv_r() is
provided.

environ, getenv(), setenv(), and unsetenv() are required by
the POSIX_SINGLE_PROCESS Option Group as detailed in
Section E.1 of IEEE-1003.1-2017.

The POSIX_SINGLE_PROCESS Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-08 04:28:47 -05:00
Radoslaw Koppel 118f1592ff buildsystem: Enable LTO also for the application
It turns out that currently LTO is enabled only for the kernel.
This commit updates it to enable it for the whole application
and adds additional LTO exclusions required for the standard
C libraries to build and link properly.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-03-02 15:39:36 +01:00
Robert Lubos 0966be01fc libc: Move gmtime_r into common
gmtime_r() has been in the minimal libc for years, however it was not
added to expcetions due to an overlook. In order to do this however, it
has to be moved first to the common libc area, so that it's available
to any libc that may not implement it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-28 00:54:42 +09:00
James Ogier ffa49a8240 libc: newlib: Grant access to dynamic locks from all threads
Fixes: zephyrproject-rtos#67504

The following error is produced  when using the following configuration
```
CONFIG_USERSPACE=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_NANO=n
CONFIG_DYNAMIC_OBJECTS=y
CONFIG_HEAP_MEM_POOL_SIZE=256
CONFIG_THREAD_LOCAL_STORAGE=y
CONFIG_MAIN_STACK_SIZE=2048
```

```
os: thread 0x301a2950 (-1) does not have permission on k_mutex 0x301aaca4
os: permission bitmap
01 00 |..
os: syscall z_vrfy_k_mutex_lock failed check: access denied
os: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000
os: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000000
os: xpsr: 0x00000000
os: s[ 0]: 0x00000000 s[ 1]: 0x00000000 s[ 2]: 0x00000000 s[ 3]: 0x00000000
os: s[ 4]: 0x00000000 s[ 5]: 0x00000000 s[ 6]: 0x00000000 s[ 7]: 0x00000000
os: s[ 8]: 0x00000000 s[ 9]: 0x00000000 s[10]: 0x00000000 s[11]: 0x00000000
os: s[12]: 0x00000000 s[13]: 0x00000000 s[14]: 0x00000000 s[15]: 0x00000000
os: fpscr: 0x00000000
os: Faulting instruction address (r15/pc): 0xee7fdb7d
os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
os: Current thread: 0x301a2950
```

This bug caused by a global mutex used by _vfprintf_r()
which is initialized in __sinit() and located in z_malloc_partition
not being granted access to be used my multiple user threads
despite each user thread being granted read and write permission
to the z_malloc_partition.

Here is a sample main.c to reproduce the bug
```

extern struct k_mem_partition z_libc_partition;
extern struct k_mem_partition z_malloc_partition;

static k_tid_t tids[TEST_THDS];
static struct k_thread tcbs[TEST_THDS];
static struct k_mem_domain domains[TEST_THDS];
static K_THREAD_STACK_ARRAY_DEFINE(thd_stacks, TEST_THDS, 2048);

static int forbidden_global_data = 2;

void thread_worker(void* a, void* b, void* c) {
    (void)b;
    (void)c;
    printf("thd %d started\n", (int)(intptr_t)a);
    k_sleep(K_MSEC(1000));
    forbidden_global_data++; /* This should cause an MPU Fault */
}

int main(void) {
    forbidden_global_data = 1;
    struct k_mem_partition* share_parts[2] = {
        &z_libc_partition,
        &z_malloc_partition,
    };

    for (int i = 0l; i < TEST_THDS; i++) {
        tids[i] = k_thread_create(
			&tcbs[i],
			thd_stacks[i],
			K_THREAD_STACK_SIZEOF(thd_stacks[i]),
			thread_worker,
			(void*)(intptr_t)i,
			NULL,
			NULL,
			5,
			K_USER,
			K_FOREVER);
        k_mem_domain_init(&domains[i], 2, share_parts);
        k_mem_domain_add_thread(&domains[i], tids[i]);
        k_thread_start(tids[i]);
   }

    for (int i = 0; i < TEST_THDS; i++) {
        k_thread_join(tids[i], K_FOREVER);
    }

   return 0;
}
```

Signed-off-by: James Ogier <jogier@meta.com>
2024-02-07 15:22:38 +00:00
Keith Packard e569a13d39 libc/newlib: Wrap <string.h> to define strnlen and strtok_r when needed
Newlib doesn't have Zephyr support, so we need to define these functions
when the application doesn't ask for the right level of POSIX support.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-02-02 19:54:33 +01:00
Keith Packard 9dcbfa8bf2 libc/picolibc: Remove the global definition of _POSIX_C_SOURCE
This was necessary to get Picolibc to expose the whole Zephyr C library
API, but current versions of the SDK use a version of Picolibc with
built-in Zephyr support.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-01-26 07:48:55 -05:00
Nikolay Agishev 04601aedad ARCMWDT: Add headers for POSIX compatibility
Add ENODATA errno code, wich is not presented in ARCMWDT headers
Add PATH_MAX define

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-12-19 08:53:51 -06:00
Christopher Friedt 04c9903055 posix: pthread_once: simplify and reduce size of pthread_once_t
Since pthread_once() is both the initializer and executor of
pthread_once_t, it can have maximally two states. Since the
implementation in Zephyr previously aimed to maximize libc
compatibility, we opted to use the definition of pthread_once_t
from newlib, which is a structure with two ints.

It does not make sense to use 64 bits to manage 2 possible
states. The control for that should effectively be a bool.

We maintain compatibility with newlib by asserting (at build
time), that newlib's pthread_once_t is larger than Zephyr's
new struct pthread_once (which just contains a bool).

This allows us to delete the non-standard pthread_key.h
header file (finally).

Reuse the pthread_pool_lock in order to synchronize the related
init function (so that it is only called maximally once from any
thread). The spinlock is only used to test the state and the
init function is not called with the spinlock held.

The alternative was to use an atomic inside of
struct pthread_once. But again, that could be up to 64-bits with
Zephyr's atomics implementation.

Ideally we would use C11 generics or something to support atomics
on 8, 16, 32, and 64-bit primitives.

Lastly, also update declarations for C11 threads as they mostly
mirror our pthread implementation.

This needed to be done as a single commit in order to ensure
continuity of build.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-14 09:32:58 +01:00
Florian La Roche 6621e780c9 lib: libc: minimal: proper cast to "(char *)" from "(const char *)"
The string "" is of type '(const char *)', so add a cast over to
'(char *)' to clean up source code.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-12-13 20:12:45 +01:00
Keith Packard 7a5fcb8c60 libc/picolibc: Support 'long long' and 'minimal' printf variants
Picolibc's 'minimal' printf mode reduces functionality and size even more
than the 'integer' mode. Use this where memory is at a premium and where
the application knows that it does not require exact printf semantics.

1.8.5 adds two more printf variants, 'long long' and 'minimal'. The 'long
long' variant is the same as the 'integer' variant but with long long
support enabled. The 'minimal' variant reduces functionality and size even
more than the 'integer' mode. Applications can use this where memory is at
a premium and where the application does not require exact printf
semantics.

With these two added variants, the SDK has enough options so that all of
the cbprintf modes can be supported with the pre-compiled bits:

 1. CBPRINTF_NANO - picolibc's 'minimal' variant
 2. CBPRINTF_REDUCED_INTEGRAL - picolibc's 'integer' variant
 3. CBPRINTF_FULL_INTEGRAL - picolibc's 'long long' variant
 4. CBPRINTF_FB_SUPPORT - picolibc's 'double' variant

This patch makes the cbprintf Kconfig values drive the default picolibc
variant, disables picolibc variants not capable of supporting the required
cbprintf level, but allows applications to select more functionality in
picolibc than cbprintf requires.

Note that this depends on the SDK including picolibc 1.8.5. Without that,
selecting the 'minimal' or 'long long' variant in Zephyr will end up with
the default variant from picolibc, which is the full version with floating
point support. When using the module things will work as specified.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 5347a834af libc/picolibc: Support picolibc's assert-verbose option
This option in picolibc switches the assert macro between a chatty version
and one which provides no information at all. This latter mode avoids
placing the associated strings in memory.

The Zephyr option is PICOLIBC_ASSERT_VERBOSE and it is disable by default.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Daniel Leung c972ef1a0f kernel: mm: move kernel mm functions under kernel includes
This moves the k_* memory management functions from sys/ into
kernel/ includes, as there are kernel public APIs. The z_*
functions are further separated into the kernel internal
header directory.

Also made a quick change to doxygen to group sys_mem_* into
the OS Memory Management group so they will appear in doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-20 09:19:14 +01:00
Christopher Friedt 4c58c6b4c4 libc: common: support for C11 call_once()
Add C11 call_once() support to go with C11 threads
and mutexes.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt b9db7df628 libc: common: support for C11 thread-specific storage
Add C11 thread-specific storage (tss) support to go with C11 threads
and mutexes.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 7e539e2706 libc: common: support for C11 condition variables
Add C11 condition variable support to go with C11 threads
and mutexes.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 576ae7f677 lib: libc: common: add C11 mutex implementation
Add support for C11 mutexes to go with C11 threads.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Christopher Friedt 97668b8b09 libc: common: add support for iso c11 threads
This change capitalizes on newly added support for dynamic
thread stacks and the existing pthread support to provide
an implementation of the ISO C11 `<threads.h>` API.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00
Grant Ramsay a3ff19a39e cmake: compiler: Add compiler property for no-builtin
Abstracts these flags for multiple toolchain support

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-13 10:21:41 +01:00
Grant Ramsay 679d82c484 libc: Add GCC fno-builtin-malloc flag to common stdlib compilation
This prevents the compiler from optimizing calloc into an
infinite recursive call.

For example a call to malloc + memset zero at GCC -O2 will be
replaced by a call to calloc. This causes infinite recursion
if the function being implemented *is* calloc.

fno-builtin-malloc forces the compiler to avoid this optimization.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-13 10:21:41 +01:00
Keith Packard f4e6e4b2e5 libc/picolibc: Don't force TLS when using picolibc module
The picolibc module can be built without thread local storage support if
desired. Allow that by using 'imply' instead of 'select'. However, when
using the toolchain picolibc, we assume that TLS will be enabled wherever
supported, so make sure we match by adding a 'select' for this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-07 09:42:19 +01:00
Anas Nashif a08bfeb49c syscall: rename Z_OOPS -> K_OOPS
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 9c4d881183 syscall: rename Z_SYSCALL_ to K_SYSCALL_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif df9428991a syscall: Z_SYSCALL_MEMORY_ARRAY -> K_SYSCALL_MEMORY_ARRAY
Rename macros and do not use Z_ for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 4e396174ce kernel: move syscall_handler.h to internal include directory
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Keith Packard 1e40199c8d libc: Add REQUIRES_FLOAT_PRINTF to indirectly set printf support
Instead of making applications use C library specific settings to enable
floating point support in printf, provide this indirect symbol which then
detects which C library is in use and selects the correct configuration for
each.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Patryk Duda 3ec58ff749 libc/newlib: Add support for LLVM toolchain
When Zephyr is compiled using LLVM toolchain, we don't need to link with
libgcc to resolve libc dependencies. With this patch, the trick will be
applied only when the GNU compiler is used. Otherwise, we will just link
libc, which works for LLVM.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-10-23 11:41:57 +02:00
Alberto Escolar Piedras f97ac476f3 libC Kconfig: Do not default to picolibc for native_sim due to GETOPT
Defaulting to picolibc when selecting GETOPT is a bit nicer for users
in some cases, but not required.
But too many things require GETOPT (for ex. some SHELL configurations)
in combinations with native posix drivers which do not support
yet embedded libcs (for ex. the native USB driver)
(see https://github.com/zephyrproject-rtos/zephyr/issues/60096 )

Which leads to configurations in those cases which cannot be built.
Keep defaulting to the external libC in this case.

This reverts the getop part of this commit:
5f8057e262

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-23 10:25:22 +02:00
Alberto Escolar Piedras 5f8057e262 libC kconfig: default to PICOLIBC for NATIVE_LIBRARY if POSIX_API
When building with the POSIX_API we cannot use the host libC.
When using GETOPT it is similarly quite difficult for users
to use the host libC.
So to make it easier for users, let's just default to PICOBLIC
in those cases,
while we continue defaulting to the host library in other cases
so users can use the Linux APIs for whatever test functionality
they want.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:34 +02:00
Keith Packard e7126b5d84 libc/common: Place malloc data structures in libc partition
Leave the malloc partition so that it only contains the heap itself; this
lets the initialization code adjust the address range when configuring the
arena at startup.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-10 23:39:40 +03:00
Keith Packard eb024b655f libc: Control Z_LIBC_PARTITION_EXISTS from Kconfig
Instead of adding every possible subsystem which places variables in the C
library memory partition in libc-hooks.h, place those conditions in the
related Kconfig files and simplify the libc-hooks.h to just looking at
CONFIG_NEED_LIBC_MEM_PARTITION.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-10 23:39:40 +03:00
Al Semjonovs 955d85aa67 libc: picolibc: Fix picolibc to allow third party CPP
Picolibc dependencies limit ability to use third party minimal
implementations of CPP when enablng PICOLIBC_USE_MODULE.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-10-09 15:05:39 +03:00
Wilfried Chauveau d79ba86c04 lib: libc: armstdc: add missing retarget of fputc to _stdout_hook
Fixes #62677 where printf defaults to using armclang's semihosting backed
implementation of printf.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-10-04 11:02:37 +02:00
Daniel Leung 0a50ff366e kernel: rename z_current_get() to k_sched_current_thread_query()
The original idea of z_current_get() was to be the counterpart
of k_current_get() when thread local variable for current has
not been initialized if TLS is enabled, otherwise they are
the same function. Now since z_current_get() is being used
outside of core kernel, rename it under kernel namespace so
other subsystem can conceptually use them too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 16:15:46 +02:00
Keith Packard ae92df1e4a libc/common: Don't use malloc mutex when CONFIG_MULTITHREADING=n
When multithreading is disabled, the whole mutex infrastructure isn't
available. The common malloc code wasn't checking for this case which
caused build failures.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Detlev Zundel dzu@member.fsf.org
2023-09-25 18:42:21 -04:00
Daniel Leung b21d35d357 libc: picolibc: disable prompt for PICOLIBC_USE_MODULE...
...when toolchain does not have native picolibc support.
Without native support, picolibc needs to be built from
the module. Disabling the prompt means this kconfig
takes on whatever default value specified, which is
to build source from module when there is no native
support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Daniel Leung 01dd2f0897 libc: picolibc: extend support beyond Zephyr SDK
The picolibc kconfigs were tied to ZEPHYR_TOOLCHAIN_VARIANT
and it only supported the Zephyr SDK, which is the only
toolchain having picolibc built-in at the moment. This
commit generalizes that to use TOOLCHAIN_HAS_PICOLIBC
cmake variable the same way as newlib: TOOLCHAIN_HAS_NEWLIB.
This provides the ability for other toolchains to declare
their support for picolibc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Keith Packard f0daf904bb libc: Default to picolibc where supported
This switches the default C library to picolibc for all targets which
support it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-04 15:29:13 -04:00
Carles Cufi 8c748fd005 kernel: Modify the signature of k_mem_slab_free()
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.

The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);

has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);

The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.

All in-tree uses of the function have been adapted.

Fixes #61888.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-09-03 18:20:59 -04:00
Keith Packard 101cdcd86e libc/common: Add memalign
Memalign is another name for the posix aligned_alloc function, although it
has weaker restrictions on the relationship between the alignment and size.

memalign() is used internally by the libstdc++ when built for 'newlib'
targets (which includes picolibc) instead of aligned_alloc() due to a bug
in gcc, so we need to provide an implementation of this when using that
library, even though it's not part of the Zephyr C library API.

When a fix for the libstdc++ is merged upstream and can be consider a
reasonable dependency for Zephyr, this work-around can be removed.

Closes: #57899

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-10 11:35:17 -04:00
Keith Packard d47025bd84 libc/picolibc: Remove unused read_stdin/write_stdout hooks
Picolibc doesn't need these two syscall implementations as it uses
zephyr_fputc instead. Make sure that zephyr_putc is declared correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-02 10:35:18 +02:00
Daniel Leung 4c80949ecf libc: remove no longer valid kconfig comment
After commit 9a0aebc5fd,
the exclusion of qemu_x86_tiny is no longer and the "depends on"
option was removed. However, the comment about that remained.
Remove the comment as it is no longer valid.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-20 12:58:36 -04:00
Lawrence King 7dae27a90d libc: minimal: math sqrt: sqrtf: fix numeric accuracy of sqrt and sqrtf.
Changed initial guess from a simple x/3 to dividing the exponent by 2.
This makes large or small numbers like 10e10 and 01e-10 converge in a few
loops.

Added a loop counter to ensure that the algorithm breaks out of the loop in
the case that the algorithm doesn't converge (toggling between two
numbers).

Added test cases for sqrt and sqrtf in libc. Tested with a range of numbers
between 10e10 and 10e-10. Verify good accuracy in test case.

Closes: #55962

Signed-off-by: Lawrence King <lawrencek52@gmail.com>
2023-07-14 12:42:41 -04:00
Keith Packard 021923b58a libc/picolibc: Use mutexes instead of semaphores for non-recursive locks
Picolibc has both recursive and non-recursive mutex uses. The bulk of the
library locking uses the global libc lock, which is a recursive mutex as
that greatly simplifies the implementation.

The only use of non-recursive mutexes is in the stdio code when dealing
with file system I/O via fopen.

Using mutexes for both APIs is valid; the assumption picolibc makes is that
the non-recursive mutexes are somehow cheaper or faster and should be
preferred. However, in Zephyr, recursive mutexes are the default and the
non-recursive locks for picolibc were implemented using semaphores.

Switch the non-recursive picolibc locks to just invoking the existing
recursive functions using mutexes. This avoids pulling in another lock
implementation, saving a bit of space.

This also lets the kernel.memory_protection.mem_map test work on
qemu_x86_tiny where the amount of memory available is 320kB and that is
nearly filled by this test case, leaving too little space for allocating
pages in the k_mem_map_unmap test.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-07-10 15:11:15 +02:00
Keith Packard 4e7930b099 libc/picolibc: Remove -T /dev/null linker arguments
Now that the gcc compiler driver uses the -T flag instead of -Wl,-T, we can
remove the hack here that kept the picolibc specs file from inserting the
picolibc linker script.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-07-06 11:43:09 +02:00
Alberto Escolar Piedras 7e37482a77 libC: PICOLIBC_SUPPORTED: Enable for NATIVE_LIBRARY
It is possible to build with the PICOLIBC_MODULE
with the POSIX arch targets which use the native
simulator as runner.
Update filtering accordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras 2e6396cf20 libC: STDOUT_CONSOLE narrow filtering by type of native build
It is possible to build with STDOUT_CONSOLE with
the embedded C libraries with the POSIX arch.
Narrow down the filtering accordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras 56dc20eb1d Kconfig: Tidy up dependants of NATIVE_APPLICATION
So they depend or select on the right NATIVE_BUILD
instead of NATIVE_APPLICATION.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00