diff --git a/cmake/modules/FindTargetTools.cmake b/cmake/modules/FindTargetTools.cmake index f74f10f28458d7a..a1fa4bf5c67b76e 100644 --- a/cmake/modules/FindTargetTools.cmake +++ b/cmake/modules/FindTargetTools.cmake @@ -41,10 +41,7 @@ set(CMAKE_CXX_COMPILER_FORCED 1) # variable is used for constructing the file names of the platform files # like Linux.cmake or Windows-gcc.cmake. If your target is an embedded # system without OS set CMAKE_SYSTEM_NAME to "Generic". -# -# This will force CMake to load cmake/modules/Platform/Zephyr.cmake, -# allowing Zephyr-specific embedded system features to be enabled. -set(CMAKE_SYSTEM_NAME Zephyr) +set(CMAKE_SYSTEM_NAME Generic) # https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html: # The name of the CPU CMake is building for. diff --git a/cmake/modules/Platform/Zephyr.cmake b/cmake/modules/Platform/Zephyr.cmake deleted file mode 100644 index 17b552840944683..000000000000000 --- a/cmake/modules/Platform/Zephyr.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright (c) 2024, Arduino SA - -# Perform the same initialization as the Generic platform, then enable -# dynamic library support if CONFIG_LLEXT is enabled. - -include(Platform/Generic) - -# Enable dynamic library support when CONFIG_LLEXT is enabled. -if(CONFIG_LLEXT) - set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS true) -endif() diff --git a/cmake/modules/kernel.cmake b/cmake/modules/kernel.cmake index a093d46691fda27..7abd608e440f8ff 100644 --- a/cmake/modules/kernel.cmake +++ b/cmake/modules/kernel.cmake @@ -168,6 +168,11 @@ set(KERNEL_STRIP_NAME ${KERNEL_NAME}.strip) set(KERNEL_META_NAME ${KERNEL_NAME}.meta) set(KERNEL_SYMBOLS_NAME ${KERNEL_NAME}.symbols) +# Enable dynamic library support required by CONFIG_XTENSA for CONFIG_LLEXT support. +if(CONFIG_XTENSA AND CONFIG_LLEXT) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) +endif() + include(${BOARD_DIR}/board.cmake OPTIONAL) # If we are using a suitable ethernet driver inside qemu, then these options