From c1aa9d16e97055281378d0b346a3b38c46bfc58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Thu, 12 Apr 2018 14:48:05 +0200 Subject: [PATCH] cmake: Fix CONFIG_CUSTOM_LINKER_SCRIPT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifying a custom linker script is supposed to be supported through Kconfig, but evidently this has been unused and 100% broken at least since the CMake migration. This commit fixes https://github.com/zephyrproject-rtos/zephyr/issues/6983 Signed-off-by: Sebastian Bøe --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de8b540617..bc32fa4854 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,11 +265,9 @@ zephyr_ld_options( if(CONFIG_HAVE_CUSTOM_LINKER_SCRIPT) set(LINKER_SCRIPT ${APPLICATION_SOURCE_DIR}/${CONFIG_CUSTOM_LINKER_SCRIPT}) - if(NOT EXISTS LINKER_SCRIPT) + if(NOT EXISTS ${LINKER_SCRIPT}) set(LINKER_SCRIPT ${CONFIG_CUSTOM_LINKER_SCRIPT}) - if(NOT EXISTS LINKER_SCRIPT) - message(FATAL_ERROR "CONFIG_HAVE_CUSTOM_LINKER_SCRIPT was set, but no linker script was found at '${CONFIG_CUSTOM_LINKER_SCRIPT}'") - endif() + assert_exists(CONFIG_CUSTOM_LINKER_SCRIPT) endif() else() # Try a board specific linker file