diff options
author | Sven Gothel <[email protected]> | 2019-04-08 04:40:02 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-04-08 04:40:02 +0200 |
commit | 8915501ed02eac2b3bce9a7fc06cb1ab562901c3 (patch) | |
tree | 8fa1b70c0f1a90e0cf8b928a340f18d6d64e4f1f /cmake/toolchain.linux-gcc-armv6hf.cmake | |
parent | 73233ce69919fc19c53ce8663c5b8cc05227f07e (diff) |
Skip native build time executables when crosscompiling; Fix aarch64 + armv6hf toolchain files
Diffstat (limited to 'cmake/toolchain.linux-gcc-armv6hf.cmake')
-rw-r--r-- | cmake/toolchain.linux-gcc-armv6hf.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/toolchain.linux-gcc-armv6hf.cmake b/cmake/toolchain.linux-gcc-armv6hf.cmake new file mode 100644 index 00000000..a9fe01e8 --- /dev/null +++ b/cmake/toolchain.linux-gcc-armv6hf.cmake @@ -0,0 +1,20 @@ +# For normal gcc compilation, but use static-libgcc + +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) + +set(CMAKE_FIND_ROOT_PATH ${TARGET_PLATFORM_SYSROOT} ${TARGET_PLATFORM_USRROOT}) + +# -idirafter will be searched after implicit system-dir include '-I =/usr/include' from TARGET_PLATFORM_SYSROOT +set(CMAKE_C_FLAGS "-fpic -march=armv6 -mfpu=vfp -mfloat-abi=hard -marm -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h -idirafter /usr/include") +set(CMAKE_CXX_FLAGS "-fpic -march=armv6 -mfpu=vfp -mfloat-abi=hard -marm -include ${PROJECT_SOURCE_DIR}/cmake/glibc-compat-symbols.h -idirafter /usr/include") + +set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c++ flags") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") + +set(LINKER_FLAGS "-fpic -march=armv6 -mfpu=vfp -mfloat-abi=hard -marm -static-libgcc -L${TARGET_PLATFORM_USRLIBS} -static-libgcc") + +set(CMAKE_SHARED_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE) +set(CMAKE_MODULE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE) +set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}" CACHE STRING "linker flags" FORCE) + |