llext: xtensa: add support for the xt-clang toolchain
To build LLEXT images using the xt-clang toolchain from Cadence linker flags have to be set similar to other toolchains. Add the missing cmake files. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
5d5c13feae
commit
024bd41efb
3 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,22 @@
|
|||
# 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
|
||||
-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
|
||||
)
|
||||
|
|
3
cmake/linker/xt-ld/linker_flags.cmake
Normal file
3
cmake/linker/xt-ld/linker_flags.cmake
Normal file
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set_property(TARGET linker PROPERTY partial_linking "-r")
|
|
@ -110,7 +110,7 @@ TESTDATA_PART1 = [
|
|||
("None", "None", "env", ['BSIM_OUT_PATH', 'demo_env'], "Environment (BSIM_OUT_PATH, demo_env) not satisfied"),
|
||||
("build_on_all", True, None, None, "Platform is excluded on command line."),
|
||||
("build_on_all", True, "level", "foobar", "Unknown test level 'foobar'"),
|
||||
(None, None, "supported_toolchains", ['gcc'], "Not supported by the toolchain"),
|
||||
(None, None, "supported_toolchains", ['gcc', 'xcc', 'xt-clang'], "Not supported by the toolchain"),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue