From 8b1ca2ea9b47951447d7b99e8fbafbb9fea0864e Mon Sep 17 00:00:00 2001 From: Kabir Mohammed Date: Sat, 4 Feb 2017 13:37:25 +0530 Subject: [PATCH] Rename RPi/Bebop toolchain locations to PX4_TOOLCHAIN_DIR --- Tools/adb_upload_to_bebop.sh | 2 +- cmake/configs/posix_bebop_default.cmake | 2 +- cmake/configs/posix_rpi_cross.cmake | 2 +- cmake/posix/px4_impl_posix.cmake | 2 +- .../Toolchain-arm-linux-gnueabihf-clang.cmake | 12 ++++++------ cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake | 12 ++++++------ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Tools/adb_upload_to_bebop.sh b/Tools/adb_upload_to_bebop.sh index c8b16d98f7..d38834079f 100755 --- a/Tools/adb_upload_to_bebop.sh +++ b/Tools/adb_upload_to_bebop.sh @@ -34,7 +34,7 @@ adb shell mount -o remount,rw / adb shell touch /home/root/parameters adb shell mkdir -p /data/ftp/internal_000/fs/microsd -${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip \ +${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip \ -R .comment -R .gnu.version \ ../build_posix_bebop_default/src/firmware/posix/px4 diff --git a/cmake/configs/posix_bebop_default.cmake b/cmake/configs/posix_bebop_default.cmake index 9cefbf6f9a..664a6c6933 100644 --- a/cmake/configs/posix_bebop_default.cmake +++ b/cmake/configs/posix_bebop_default.cmake @@ -9,7 +9,7 @@ add_definitions( ) set(CMAKE_PROGRAM_PATH - "${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin" + "${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin" ${CMAKE_PROGRAM_PATH} ) diff --git a/cmake/configs/posix_rpi_cross.cmake b/cmake/configs/posix_rpi_cross.cmake index b2eec3aa9c..6d5220f227 100644 --- a/cmake/configs/posix_rpi_cross.cmake +++ b/cmake/configs/posix_rpi_cross.cmake @@ -8,6 +8,6 @@ endif() set(CMAKE_PROGRAM_PATH - "${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin" + "${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin" ${CMAKE_PROGRAM_PATH} ) diff --git a/cmake/posix/px4_impl_posix.cmake b/cmake/posix/px4_impl_posix.cmake index 493447641a..caff485447 100644 --- a/cmake/posix/px4_impl_posix.cmake +++ b/cmake/posix/px4_impl_posix.cmake @@ -274,7 +274,7 @@ elseif ("${BOARD}" STREQUAL "rpi" AND "$ENV{RPI_USE_CLANG}" STREQUAL "1") -m32 --target=arm-linux-gnueabihf -ccc-gcc-name arm-linux-gnueabihf - --sysroot=${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/) + --sysroot=${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/) set(added_c_flags ${POSIX_CMAKE_C_FLAGS} ${clang_added_flags}) list(APPEND added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS} ${clang_added_flags}) diff --git a/cmake/toolchains/Toolchain-arm-linux-gnueabihf-clang.cmake b/cmake/toolchains/Toolchain-arm-linux-gnueabihf-clang.cmake index 985b8189e7..9ad4d3d2eb 100644 --- a/cmake/toolchains/Toolchain-arm-linux-gnueabihf-clang.cmake +++ b/cmake/toolchains/Toolchain-arm-linux-gnueabihf-clang.cmake @@ -1,9 +1,9 @@ include(CMakeForceCompiler) -if ($ENV{RPI_TOOLCHAIN_DIR} STREQUAL "") - message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set") +if ($ENV{PX4_TOOLCHAIN_DIR} STREQUAL "") + message(FATAL_ERROR "PX4_TOOLCHAIN_DIR not set") else() - set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR}) + set(PX4_TOOLCHAIN_DIR $ENV{PX4_TOOLCHAIN_DIR}) endif() # this one is important @@ -15,7 +15,7 @@ set(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler # requires a symbolic link typically from /usr/bin/clang find_program(C_COMPILER clang - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) @@ -25,7 +25,7 @@ endif() cmake_force_c_compiler(${C_COMPILER} Clang) find_program(CXX_COMPILER clang++ - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) @@ -38,7 +38,7 @@ cmake_force_cxx_compiler(${CXX_COMPILER} Clang) foreach(tool objcopy nm ld) string(TOUPPER ${tool} TOOL) find_program(${TOOL} arm-linux-gnueabihf-${tool} - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) if(NOT ${TOOL}) diff --git a/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake b/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake index a60f272914..6345c4c978 100644 --- a/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake +++ b/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake @@ -16,10 +16,10 @@ include(CMakeForceCompiler) -if ("$ENV{RPI_TOOLCHAIN_DIR}" STREQUAL "") - message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set") +if ("$ENV{PX4_TOOLCHAIN_DIR}" STREQUAL "") + message(FATAL_ERROR "PX4_TOOLCHAIN_DIR not set") else() - set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR}) + set(PX4_TOOLCHAIN_DIR $ENV{PX4_TOOLCHAIN_DIR}) endif() # this one is important @@ -30,7 +30,7 @@ set(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler find_program(C_COMPILER arm-linux-gnueabihf-gcc - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) @@ -40,7 +40,7 @@ endif() cmake_force_c_compiler(${C_COMPILER} GNU) find_program(CXX_COMPILER arm-linux-gnueabihf-g++ - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) @@ -53,7 +53,7 @@ cmake_force_cxx_compiler(${CXX_COMPILER} GNU) foreach(tool objcopy nm ld) string(TOUPPER ${tool} TOOL) find_program(${TOOL} arm-linux-gnueabihf-${tool} - PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin + PATHS ${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin NO_DEFAULT_PATH ) if(NOT ${TOOL})