arch: posix: Select at least C11 standard
Replace the global CSTD property with the CSTD kconfig option to select at least C11 standard. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
a599ed13a1
commit
ff6985766b
|
@ -144,6 +144,12 @@ config ARCH_POSIX
|
|||
select BARRIER_OPERATIONS_BUILTIN
|
||||
# POSIX arch based targets get their memory cleared on entry by the host OS
|
||||
select SKIP_BSS_CLEAR
|
||||
# Override the C standard used for compilation to C 2011
|
||||
# This is due to some tests using _Static_assert which is a 2011 feature, but
|
||||
# otherwise relying on compilers supporting it also when set to C99.
|
||||
# This was in general ok, but with some host compilers and C library versions
|
||||
# it led to problems. So we override it to 2011 for the native targets.
|
||||
select REQUIRES_STD_C11
|
||||
help
|
||||
POSIX (native) architecture
|
||||
|
||||
|
|
|
@ -196,11 +196,4 @@ if(NOT ${LLVM_SANITIZERS_ARG} STREQUAL "")
|
|||
target_compile_options(native_simulator INTERFACE ${LLVM_SANITIZERS_ARG})
|
||||
endif()
|
||||
|
||||
# Override the C standard used for compilation to C 2011
|
||||
# This is due to some tests using _Static_assert which is a 2011 feature, but
|
||||
# otherwise relying on compilers supporting it also when set to C99.
|
||||
# This was in general ok, but with some host compilers and C library versions
|
||||
# it led to problems. So we override it to 2011 for the native targets.
|
||||
set_property(GLOBAL PROPERTY CSTD c11)
|
||||
|
||||
add_subdirectory(core)
|
||||
|
|
Loading…
Reference in a new issue