cmake: userspce: Always compile priv_stacks_hash.c as -Os

The gperf hash table 'kobject_hash.c' is always compiled as -Os to
resolve bug #5226, the same bug also affects the gperf hash table
'priv_stacks_hash.c'.

In this patch we copy over the fix from 'kobject_hash.c' to also fix
'priv_stacks_hash.c'.

See #5672 for more discussion on the original fix.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2019-01-28 17:48:35 +01:00 committed by Andrew Boie
parent 69a3566868
commit 5bd5e4e440
1 changed files with 2 additions and 1 deletions

View File

@ -1015,9 +1015,10 @@ if(CONFIG_ARM AND CONFIG_USERSPACE)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${PRIV_STACKS_OUTPUT_SRC}
PROPERTIES COMPILE_DEFINITIONS "${compile_definitions_interface}")
# always compile priv_stacks_hash.c at optimization -Os
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${PRIV_STACKS_OUTPUT_SRC}
PROPERTIES COMPILE_FLAGS
"${NO_COVERAGE_FLAGS} -fno-function-sections -fno-data-sections ")
"${NO_COVERAGE_FLAGS} -Os -fno-function-sections -fno-data-sections ")
# We need precise control of where generated text/data ends up in the final
# kernel image. Disable function/data sections and use objcopy to move