Skip to content

Commit bfa7d93

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 e557f72 commit bfa7d93

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
@@ -538,6 +538,10 @@ if (NOT CONFIG_COMPILER_INLINE_FUNCTION_OPTION)
538538
target_compile_options(SOF INTERFACE -fno-inline-functions)
539539
endif()
540540

541+
if (CONFIG_USERSPACE)
542+
target_compile_options(SOF INTERFACE -mno-global-merge)
543+
endif()
544+
541545
# SOF needs `typeof`, `__VA_ARGS__` and maybe other GNU C99
542546
# extensions. TODO other flags required ?
543547
target_compile_options(SOF INTERFACE $<$<COMPILE_LANGUAGE:C,ASM>: -std=gnu99>)

0 commit comments

Comments
 (0)