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-06-13 08:16:37 +02:00
committed by Lorenz Meier
parent 8f9ca9b45e
commit a6acb2e68e
7 changed files with 49 additions and 166 deletions
-5
View File
@@ -8,11 +8,6 @@ add_definitions(
-D__DF_BEBOP # Define needed DriverFramework
)
set(CMAKE_PROGRAM_PATH
"${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin"
${CMAKE_PROGRAM_PATH}
)
set(config_module_list
# examples/px4_simple_app
+1 -11
View File
@@ -1,13 +1,3 @@
include(configs/posix_rpi_common)
if("$ENV{RPI_USE_CLANG}" STREQUAL "1")
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-clang.cmake)
else()
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
endif()
set(CMAKE_PROGRAM_PATH
"${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin"
${CMAKE_PROGRAM_PATH}
)
SET(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)