Commit 024bd41e authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Carles Cufi
Browse files

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: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
parent 5d5c13fe
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
# 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 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

set_property(TARGET linker PROPERTY partial_linking "-r")
+1 −1
Original line number Diff line number Diff line
@@ -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"),
]