Skip to content

Commit

Permalink
arm: Fixed compiler path incorrect if compiled on Windows with CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykos committed May 5, 2023
1 parent e091ce7 commit d06de03
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Release (Fast)/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Release (Fast)/
2 changes: 2 additions & 0 deletions build/benchmark/eclipse/perf-stm32f407g-disc1-stk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/Release (Small)/
/Release (Fast)/
13 changes: 7 additions & 6 deletions build/cmake/toolchain/arm-none-eabi-gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#

# Identity
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 0)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 0)
set(CMAKE_SYSTEM_PROCESSOR arm)

# Options
option(ENABLE_LTO "enable LTO" OFF)
Expand Down Expand Up @@ -46,8 +46,9 @@ if (NOT TOOLCHAIN_PATH)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Found compiler at path: ${GCC_PATH}")
cmake_path(GET GCC_PATH PARENT_PATH TOOLCHAIN_PATH_BIN)
#get_filename_component(TOOLCHAIN_PATH_BIN ${GCC_PATH} DIRECTORY)
cmake_path(GET GCC_PATH PARENT_PATH TOOLCHAIN_PATH_BIN_RAW)
#get_filename_component(TOOLCHAIN_PATH_BIN_RAW ${GCC_PATH} DIRECTORY)
string(REPLACE "\\" "/" TOOLCHAIN_PATH_BIN ${TOOLCHAIN_PATH_BIN_RAW})
message(STATUS "Using compiler path: ${TOOLCHAIN_PATH_BIN}")
set(TOOLCHAIN_PATH ${TOOLCHAIN_PATH_BIN}/..)
endif()
Expand Down

0 comments on commit d06de03

Please sign in to comment.