cmake/gcc: Don't use -nostdinc with toolchain picolibc
When using picolibc from the toolchain, we need to use the standard include
paths to make sure the library headers are found, especially for libstdc++.
Add toolchain picolibc to the list of cases for which this is the case.
@@ -104,6 +104,7 @@ set_compiler_property(PROPERTY warning_error_coding_guideline
set_compiler_property(PROPERTY cstd -std=)
if (NOT CONFIG_NEWLIB_LIBC AND
+ NOT (CONFIG_PICOLIBC AND NOT CONFIG_PICOLIBC_USE_MODULE) AND
NOT COMPILER STREQUAL "xcc" AND
NOT CONFIG_HAS_ESPRESSIF_HAL AND
NOT CONFIG_NATIVE_APPLICATION)
