zephyr/cmake: fix target_compile_options() comments. No code change

Add reference to -fno-inline-functions issue
https://github.com/thesofproject/sof/issues/5212

Add examples of compilation failures without gnu99.

Fixes commit e430629a1e ("xt-clang: Do not use -std=gnu99 for C++")
that separated the comment from its code.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2022-11-22 18:18:42 +00:00 committed by Liam Girdwood
parent 3b35639198
commit 5311f61037
1 changed files with 4 additions and 1 deletions

View File

@ -896,8 +896,11 @@ set(VERSION_H_PATH ${GENERATED_DIRECTORY}/sof_versions.h)
find_package(Python3 COMPONENTS Interpreter)
set(PYTHON3 "${Python3_EXECUTABLE}")
# SOF uses GNU C99 extensions. TODO other flags required ?
# We don't know why we have this https://github.com/thesofproject/sof/issues/5212
target_compile_options(SOF INTERFACE -fno-inline-functions)
# SOF needs `typeof`, `__VA_ARGS__` and maybe other GNU C99
# extensions. TODO other flags required ?
target_compile_options(SOF INTERFACE $<$<COMPILE_LANGUAGE:C,ASM>: -std=gnu99>)
# Toolchain info