Skip to content

Commit 8ceeded

Browse files
jxsteltersoftwarecki
authored andcommitted
zephyr: userspace: Fix compilation options
When CONFIG_USERSPACE enabled, the merging of global symbols ends with SOF failures. The merging must be disabled when CONFIG_USERSPACE is set. The patch fix also disabling -fno-inline-functions option which works differently for clang, completely disabling function inlining. Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
1 parent 58f7aa9 commit 8ceeded

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zephyr/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,10 @@ if (NOT CONFIG_COMPILER_INLINE_FUNCTION_OPTION)
522522
target_compile_options(SOF INTERFACE -fno-inline-functions)
523523
endif()
524524

525+
if (CONFIG_USERSPACE)
526+
target_compile_options(SOF INTERFACE -mno-global-merge)
527+
endif()
528+
525529
# SOF needs `typeof`, `__VA_ARGS__` and maybe other GNU C99
526530
# extensions. TODO other flags required ?
527531
target_compile_options(SOF INTERFACE $<$<COMPILE_LANGUAGE:C,ASM>: -std=gnu99>)

0 commit comments

Comments
 (0)