zephyr/cmake/compiler/gcc/target_xtensa.cmake
Luca Burelli 1e47c64266 llext: use CMake shared library support on Xtensa
This change reworks the Xtensa support in llext to use CMake's native
shared library support, instead of manually running "gcc -shared".

This change minimizes the differences in llext handling by defining
appropriate CMake targets for the different architectures.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-08 09:04:32 +02:00

21 lines
344 B
CMake

# SPDX-License-Identifier: Apache-2.0
# Flags not supported by llext linker
# (regexps are supported and match whole word)
set(LLEXT_REMOVE_FLAGS
-fno-pic
-fno-pie
-ffunction-sections
-fdata-sections
-g.*
-Os
-mcpu=.*
)
# Flags to be added to llext code compilation
set(LLEXT_APPEND_FLAGS
-fPIC
-nostdlib
-nodefaultlibs
)