Skip to content

Commit 5bd5e4e

Browse files
SebastianBoeandrewboie
authored andcommitted
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 <[email protected]>
1 parent 69a3566 commit 5bd5e4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,10 @@ if(CONFIG_ARM AND CONFIG_USERSPACE)
10151015
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${PRIV_STACKS_OUTPUT_SRC}
10161016
PROPERTIES COMPILE_DEFINITIONS "${compile_definitions_interface}")
10171017

1018+
# always compile priv_stacks_hash.c at optimization -Os
10181019
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${PRIV_STACKS_OUTPUT_SRC}
10191020
PROPERTIES COMPILE_FLAGS
1020-
"${NO_COVERAGE_FLAGS} -fno-function-sections -fno-data-sections ")
1021+
"${NO_COVERAGE_FLAGS} -Os -fno-function-sections -fno-data-sections ")
10211022

10221023
# We need precise control of where generated text/data ends up in the final
10231024
# kernel image. Disable function/data sections and use objcopy to move

0 commit comments

Comments
 (0)