Skip to content

Commit

Permalink
cmake: posix: Use absolute paths for toolchain paths
Browse files Browse the repository at this point in the history
Make posix align with non-posix platforms by having CMAKE_C_COMPILER
and friends use absolute paths.

Signed-off-by: Sebastian Bøe <[email protected]>
  • Loading branch information
SebastianBoe authored and carlescufi committed Apr 27, 2018
1 parent 71b849f commit 8bcf30e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cmake/compiler/host-gcc.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Configures CMake for using GCC

set(CMAKE_C_COMPILER gcc CACHE INTERNAL " " FORCE)
set(CMAKE_OBJCOPY objcopy CACHE INTERNAL " " FORCE)
set(CMAKE_OBJDUMP objdump CACHE INTERNAL " " FORCE)
#set(CMAKE_LINKER ld CACHE INTERNAL " " FORCE) # Not in use yet
set(CMAKE_AR ar CACHE INTERNAL " " FORCE)
set(CMAKE_RANLILB ranlib CACHE INTERNAL " " FORCE)
set(CMAKE_READELF readelf CACHE INTERNAL " " FORCE)
set(CMAKE_GDB gdb CACHE INTERNAL " " FORCE)
set(CMAKE_C_FLAGS -m32 CACHE INTERNAL " " FORCE)
set(CMAKE_CXX_FLAGS -m32 CACHE INTERNAL " " FORCE)
set(CMAKE_SHARED_LINKER_FLAGS -m32 CACHE INTERNAL " " FORCE)
find_program(CMAKE_C_COMPILER gcc )
find_program(CMAKE_OBJCOPY objcopy)
find_program(CMAKE_OBJDUMP objdump)
#find_program(CMAKE_LINKER ld ) # Not in use yet
find_program(CMAKE_AR ar )
find_program(CMAKE_RANLILB ranlib )
find_program(CMAKE_READELF readelf)
find_program(CMAKE_GDB gdb )

set(CMAKE_C_FLAGS -m32 )
set(CMAKE_CXX_FLAGS -m32 )
set(CMAKE_SHARED_LINKER_FLAGS -m32 )

if(CONFIG_CPLUSPLUS)
set(cplusplus_compiler g++)
Expand All @@ -24,5 +25,4 @@ else()
set(cplusplus_compiler ${CMAKE_C_COMPILER})
endif()
endif()
set(CMAKE_CXX_COMPILER ${cplusplus_compiler} CACHE INTERNAL " " FORCE)

find_program(CMAKE_CXX_COMPILER ${cplusplus_compiler} CACHE INTERNAL " " FORCE)

0 comments on commit 8bcf30e

Please sign in to comment.