From 56f6a33a71c46ec5b2e1beb6076edf9521014ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Thu, 1 Aug 2019 16:24:28 +0200 Subject: [PATCH] [nrf noup] cmake: Ensure that 4 variables are initialized before de-referenced MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a multi-image build variables must be initialized before they are de-referenced or else values from one image may accidentally affect another image. Signed-off-by: Sebastian Bøe --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66aa1ed74be722..7488afe29c6b42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,6 +354,9 @@ zephyr_cc_option(-fmacro-prefix-map=${ZEPHYR_BASE}=ZEPHYR_BASE) # Declare MPU userspace dependencies before the linker scripts to make # sure the order of dependencies are met +unset(APP_SMEM_ALIGNED_DEP) +unset(APP_SMEM_UNALIGNED_DEP) +unset(PRIV_STACK_DEP) if(CONFIG_USERSPACE) set(APP_SMEM_ALIGNED_DEP ${IMAGE}app_smem_aligned_linker) set(APP_SMEM_UNALIGNED_DEP ${IMAGE}app_smem_unaligned_linker) @@ -660,6 +663,7 @@ endforeach() get_property(OUTPUT_FORMAT GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT) +unset(CODE_RELOCATION_DEP) if (CONFIG_CODE_DATA_RELOCATION) set(CODE_RELOCATION_DEP ${IMAGE}code_relocation_source_lib) endif() # CONFIG_CODE_DATA_RELOCATION