Browse Source

Require HEXAGON_ARM_SYSROOT for arm-linux-gnueabihf

The Toolchain-arm-linux-gnueabihf.cmake is currently used for
the SnapdragonFlight Apps processor.

The sysroot is required for cross building for Ubuntu 14.04 armhf.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
sbg
Mark Charlebois 9 years ago committed by Julian Oes
parent
commit
252eca9fb5
  1. 8
      cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake

8
cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake

@ -23,6 +23,12 @@ else() @@ -23,6 +23,12 @@ else()
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
if ("$ENV{HEXAGON_ARM_SYSROOT}" STREQUAL "")
message(FATAL_ERROR "HEXAGON_ARM_SYSROOT not set")
else()
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_ARM_SYSROOT})
endif()
# this one is important
set(CMAKE_SYSTEM_NAME Generic)
@ -69,7 +75,7 @@ foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip) @@ -69,7 +75,7 @@ foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip)
endif()
endforeach()
set(C_FLAGS "--sysroot=${HEXAGON_SDK_ROOT}/sysroot")
set(C_FLAGS "--sysroot=${HEXAGON_ARM_SYSROOT}")
set(LINKER_FLAGS "-Wl,-gc-sections")
set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
set(CMAKE_C_FLAGS ${C_FLAGS})

Loading…
Cancel
Save