From 2a3f43458ba326645b42ec7d7a34b49fde630d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20=C3=98ye=20Amundsen?= Date: Thu, 29 Nov 2018 09:12:38 +0000 Subject: [PATCH] cmake: Move check for '-nostdinc' up. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is done to make future modifications simpler, as more variables and functions are available. Signed-off-by: Håkon Øye Amundsen --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a972dbc32..fba78154dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,6 +336,10 @@ zephyr_ld_options( ${LINKERFLAGPREFIX},--build-id=none ) +if(NOT CONFIG_NATIVE_APPLICATION) + set(NOSTDINC_F -nostdinc) +endif() + if(NOT CONFIG_NATIVE_APPLICATION) # Funny thing is if this is set to =error, some architectures will # skip this flag even though the compiler flag check passes @@ -1188,10 +1192,6 @@ set_property(TARGET zephyr_prebuilt PROPERTY LINK_DEPENDS ${PROJECT_BINARY_DIR add_dependencies( zephyr_prebuilt ${ALIGN_SIZING_DEP} ${PRIV_STACK_DEP} linker_script offsets) -if(NOT CONFIG_NATIVE_APPLICATION) - set(NOSTDINC_F -nostdinc) -endif() - if(GKOF OR GKSF) set(logical_target_for_zephyr_elf kernel_elf)