The LLEXT linker for Xtensa cannot relocate FLIX commands, disable them in extensions only until we have a solution. Note, that this only affects extensions, the main Zephyr binary is still built with FLIX commands. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
34 lines
623 B
CMake
34 lines
623 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
include(${ZEPHYR_BASE}/cmake/compiler/xcc/target.cmake)
|
|
|
|
# Flags not supported by llext linker
|
|
# (regexps are supported and match whole word)
|
|
set(LLEXT_REMOVE_FLAGS
|
|
-ffunction-sections
|
|
-fdata-sections
|
|
-g.*
|
|
-Os
|
|
-mcpu=.*
|
|
)
|
|
|
|
# Flags to be added to llext code compilation
|
|
set(LLEXT_APPEND_FLAGS
|
|
-nostdlib
|
|
-nodefaultlibs
|
|
)
|
|
|
|
if(CONFIG_LLEXT_BUILD_PIC)
|
|
set(LLEXT_REMOVE_FLAGS ${LLEXT_REMOVE_FLAGS}
|
|
-fno-pic
|
|
-fno-pie
|
|
)
|
|
set(LLEXT_APPEND_FLAGS ${LLEXT_APPEND_FLAGS}
|
|
-fPIC
|
|
)
|
|
else()
|
|
set(LLEXT_APPEND_FLAGS ${LLEXT_APPEND_FLAGS}
|
|
-ffreestanding
|
|
-mno-generate-flix
|
|
)
|
|
endif()
|