Skip to content
Permalink
Browse files

cmake: Toolchain abstraction: move PROPERTY_LINKER_SCRIPT_DEFINES

Move PROPERTY_LINKER_SCRIPT_DEFINES to toolchain_ld_base.

No functional change expected.

This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
  • Loading branch information...
mped-oticon authored and nashif committed May 7, 2019
1 parent 1e314df commit d7ee114106eab485688223d97a49813d33b4cf21
Showing with 4 additions and 4 deletions.
  1. +0 −4 CMakeLists.txt
  2. +4 −0 cmake/linker/ld/target_base.cmake
@@ -41,10 +41,6 @@ set(KOBJ_TYPES_H_TARGET kobj_types_h_target)
set(LINKER_SCRIPT_TARGET linker_script_target)


if(NOT PROPERTY_LINKER_SCRIPT_DEFINES)
set_property(GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES -D__GCC_LINKER_CMD__)
endif()

define_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT BRIEF_DOCS " " FULL_DOCS " ")
set_property( GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-little${ARCH}) # BFD format

@@ -4,6 +4,10 @@

macro(toolchain_ld_base)

if(NOT PROPERTY_LINKER_SCRIPT_DEFINES)
set_property(GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES -D__GCC_LINKER_CMD__)
endif()

# TOOLCHAIN_LD_FLAGS comes from compiler/gcc/target.cmake
# LINKERFLAGPREFIX comes from linker/ld/target.cmake
zephyr_ld_options(

0 comments on commit d7ee114

Please sign in to comment.
You can’t perform that action at this time.