Skip to content
Snippets Groups Projects
Commit 3dd32492 authored by Nicolae Rosia's avatar Nicolae Rosia Committed by Lorenz Meier
Browse files

Move find of STRIP_TOOL to toolchain

parent a50a8792
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,8 @@ foreach(tool echo grep rm mkdir nm cp touch make unzip)
endif()
endforeach()
FIND_PROGRAM(STRIP_TOOL "arm-linux-gnueabihf-strip")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
#set(CMAKE_C_FLAGS ${C_FLAGS})
#set(CMAKE_CXX_LINKER_FLAGS ${C_FLAGS})
......
......@@ -140,14 +140,12 @@ install(TARGETS px4 DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
FIND_PROGRAM(STRIP_TOOL "arm-linux-gnueabihf-strip")
add_custom_target(strip
DEPENDS px4.stripped
)
add_custom_command(OUTPUT px4.stripped
COMMAND arm-linux-gnueabihf-strip -R .comment -R .gnu.version $<TARGET_FILE:px4>
COMMAND ${STRIP_TOOL} -R .comment -R .gnu.version $<TARGET_FILE:px4>
DEPENDS px4)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment