mirror of https://github.com/ARMmbed/mbed-os.git
CMake: GCC ARM linker script fix
Fixes https://github.com/ARMmbed/mbed-os/issues/13983 Move linker script to the function mbed_set_mbed_target_linker_script. I also moved memmap as it is needed for an app. The location might not be the best fit, we will address this in separate pull request.pull/13985/head
parent
33a7e66a07
commit
f97c7bd957
|
@ -141,6 +141,11 @@ function(mbed_set_mbed_target_linker_script target)
|
|||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
BYPRODUCTS "${CMAKE_BINARY_DIR}/${target}.link_script.ld"
|
||||
)
|
||||
target_link_options(mbed-core
|
||||
INTERFACE
|
||||
"-T" "${CMAKE_BINARY_DIR}/${target}.link_script.ld"
|
||||
"-Wl,-Map=${CMAKE_BINARY_DIR}/${target}.map"
|
||||
)
|
||||
elseif(MBED_TOOLCHAIN STREQUAL "ARM")
|
||||
set(CMAKE_PRE_BUILD_COMMAND COMMAND "")
|
||||
target_link_options(mbed-core
|
||||
|
|
|
@ -19,8 +19,6 @@ function(mbed_set_toolchain_options target)
|
|||
"-lnosys"
|
||||
"-Wl,--end-group"
|
||||
"-specs=nosys.specs"
|
||||
"-T" "${CMAKE_BINARY_DIR}/${APP_TARGET}.link_script.ld"
|
||||
"-Wl,-Map=${CMAKE_BINARY_DIR}/${APP_TARGET}.map"
|
||||
"-Wl,--cref"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue