From 5bd5e4e4406a56c61b4ad0609e3fe238e8ab6864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Mon, 28 Jan 2019 17:48:35 +0100 Subject: [PATCH] cmake: userspce: Always compile priv_stacks_hash.c as -Os MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee337b39671..5bbe7720084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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