From 56dc20eb1d1cde8fd7ff9cafaadcfdba964e68f2 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Fri, 26 May 2023 13:23:43 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- Kconfig.zephyr | 2 +- arch/Kconfig | 2 +- boards/posix/native_posix/Kconfig | 1 + boards/posix/nrf52_bsim/Kconfig.board | 1 + cmake/compiler/gcc/compiler_flags.cmake | 2 +- lib/cpp/Kconfig | 2 +- lib/libc/Kconfig | 2 +- subsys/testsuite/Kconfig | 2 +- 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f64f4cf0ff1..d354d008179 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -346,7 +346,7 @@ toolchain_ld_force_undefined_symbols( _ConfigAbsSyms ) -if(NOT CONFIG_NATIVE_APPLICATION) +if(NOT CONFIG_NATIVE_BUILD) # @Intent: Set linker specific flags for bare metal target toolchain_ld_baremetal() endif() diff --git a/Kconfig.zephyr b/Kconfig.zephyr index fffb658b15a..0fa8ff2db82 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -414,7 +414,7 @@ config COMPILER_COLOR_DIAGNOSTICS choice COMPILER_SECURITY_FORTIFY prompt "Detect buffer overflows in libc calls" - default FORTIFY_SOURCE_NONE if NO_OPTIMIZATIONS || MINIMAL_LIBC || NATIVE_APPLICATION + default FORTIFY_SOURCE_NONE if NO_OPTIMIZATIONS || MINIMAL_LIBC || NATIVE_BUILD default FORTIFY_SOURCE_COMPILE_TIME help Buffer overflow checking in libc calls. Supported by Clang and diff --git a/arch/Kconfig b/arch/Kconfig index 6179fd7645e..afa6fb0a709 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -142,7 +142,7 @@ config ARCH_POSIX select ARCH_HAS_CUSTOM_SWAP_TO_MAIN select ARCH_HAS_CUSTOM_BUSY_WAIT select ARCH_HAS_THREAD_ABORT - select NATIVE_APPLICATION + select NATIVE_BUILD select HAS_COVERAGE_SUPPORT select BARRIER_OPERATIONS_BUILTIN help diff --git a/boards/posix/native_posix/Kconfig b/boards/posix/native_posix/Kconfig index 5b785fd642f..3d79a87504f 100644 --- a/boards/posix/native_posix/Kconfig +++ b/boards/posix/native_posix/Kconfig @@ -4,6 +4,7 @@ config BOARD_NATIVE_POSIX bool select NATIVE_POSIX_TIMER select POSIX_ARCH_CONSOLE + select NATIVE_APPLICATION if BOARD_NATIVE_POSIX diff --git a/boards/posix/nrf52_bsim/Kconfig.board b/boards/posix/nrf52_bsim/Kconfig.board index 6dea002f541..bcf7141c25e 100644 --- a/boards/posix/nrf52_bsim/Kconfig.board +++ b/boards/posix/nrf52_bsim/Kconfig.board @@ -11,6 +11,7 @@ config BOARD_NRF52_BSIM select CLOCK_CONTROL select HAS_NRFX select HAS_NORDIC_DRIVERS + select NATIVE_APPLICATION help Will produce a console Linux process which can be executed natively. It needs the BabbleSim simulator both in compile time and to execute diff --git a/cmake/compiler/gcc/compiler_flags.cmake b/cmake/compiler/gcc/compiler_flags.cmake index f2c2845923b..75c54577cdc 100644 --- a/cmake/compiler/gcc/compiler_flags.cmake +++ b/cmake/compiler/gcc/compiler_flags.cmake @@ -106,7 +106,7 @@ 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) + NOT CONFIG_NATIVE_BUILD) set_compiler_property(PROPERTY nostdinc -nostdinc) set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC}) endif() diff --git a/lib/cpp/Kconfig b/lib/cpp/Kconfig index 1e032a9e85b..3cfb8ac57e9 100644 --- a/lib/cpp/Kconfig +++ b/lib/cpp/Kconfig @@ -73,7 +73,7 @@ config FULL_LIBCPP_SUPPORTED choice LIBCPP_IMPLEMENTATION prompt "C++ Standard Library Implementation" - default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_APPLICATION + default EXTERNAL_LIBCPP if REQUIRES_FULL_LIBCPP && NATIVE_BUILD default GLIBCXX_LIBCPP if REQUIRES_FULL_LIBCPP default MINIMAL_LIBCPP diff --git a/lib/libc/Kconfig b/lib/libc/Kconfig index 81d34fcfc68..0f3f96fa984 100644 --- a/lib/libc/Kconfig +++ b/lib/libc/Kconfig @@ -54,7 +54,7 @@ menu "C Library" choice LIBC_IMPLEMENTATION prompt "C Library Implementation" - default EXTERNAL_LIBC if NATIVE_APPLICATION + default EXTERNAL_LIBC if NATIVE_BUILD default NEWLIB_LIBC if REQUIRES_FULL_LIBC default PICOLIBC if REQUIRES_FULL_LIBC default MINIMAL_LIBC diff --git a/subsys/testsuite/Kconfig b/subsys/testsuite/Kconfig index 8de5c9d9360..cd528ec555a 100644 --- a/subsys/testsuite/Kconfig +++ b/subsys/testsuite/Kconfig @@ -44,7 +44,7 @@ config COVERAGE_GCOV bool "Create Coverage data from hardware platform" default y depends on COVERAGE - depends on !NATIVE_APPLICATION + depends on !NATIVE_BUILD help This option will select the custom gcov library. The reports will be available over serial. This serial dump can be passed to