diff --git a/app/llext_relocatable.conf b/app/llext_relocatable.conf new file mode 100644 index 000000000..76b5339e1 --- /dev/null +++ b/app/llext_relocatable.conf @@ -0,0 +1 @@ +CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 25a469260..c3419a951 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -812,6 +812,12 @@ def build_platforms(): if args.debug: overlays.append(str(pathlib.Path(SOF_TOP, "app", "debug_overlay.conf"))) + # The xt-cland Cadence toolchain currently cannot link shared + # libraries for Xtensa. Therefore when it's used we switch to + # building relocatable ELF objects. + if platf_build_environ.get("ZEPHYR_TOOLCHAIN_VARIANT") == 'xt-clang': + overlays.append(str(pathlib.Path(SOF_TOP, "app", "llext_relocatable.conf"))) + if overlays: overlays = ";".join(overlays) build_cmd.append(f"-DOVERLAY_CONFIG={overlays}")