ARM Toolchain: search compiler in PATH

Add CMake target for strip since these changes break adb_upload_to_bebop.

GCC users should add the cross compiler bin path to PATH (location of arm-linux-gnueabihf-g++).
Clang user should do the following:
* set CMAKE_CXX_COMPILER to clang++ by providing -DCMAKE_CXX_COMPILER=clang++ to cmake
* get GCC cross compiler - needed because Clang does not ship a CRT
* create a symlink for clang and clang++ in GCC cross compiler bin dir.
* add GCC bin dir to PATH

Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
This commit is contained in:
Nicolae Rosia
2017-05-15 14:13:52 +03:00
committed by Lorenz Meier
parent 8f9ca9b45e
commit a6acb2e68e
7 changed files with 49 additions and 166 deletions
+10
View File
@@ -140,4 +140,14 @@ 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>
DEPENDS px4)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :