From f79f5b9bb32895f1cc1e49b03d2014455f43da26 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 16 Jul 2019 09:58:36 -0400 Subject: [PATCH] add ppc64le toolchain --- contrib/cross/armhf.toolchain.cmake | 4 +--- contrib/cross/ppc64le.toolchain.cmake | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 contrib/cross/ppc64le.toolchain.cmake diff --git a/contrib/cross/armhf.toolchain.cmake b/contrib/cross/armhf.toolchain.cmake index 4a8b8725e..a61a270bb 100644 --- a/contrib/cross/armhf.toolchain.cmake +++ b/contrib/cross/armhf.toolchain.cmake @@ -1,11 +1,9 @@ set(CMAKE_SYSTEM_NAME Linux) set(TOOLCHAIN_PREFIX arm-linux-gnueabihf) set(TOOLCHAIN_SUFFIX -8) -# target environment on the build host system -# second one is for non-root installs + set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}) -# modify default behavior of FIND_XXX() commands set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/contrib/cross/ppc64le.toolchain.cmake b/contrib/cross/ppc64le.toolchain.cmake new file mode 100644 index 000000000..c045b4939 --- /dev/null +++ b/contrib/cross/ppc64le.toolchain.cmake @@ -0,0 +1,12 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(TOOLCHAIN_PREFIX powerpc64le-linux-gnu) +set(TOOLCHAIN_SUFFIX -8) + +set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc${TOOLCHAIN_SUFFIX}) +set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++${TOOLCHAIN_SUFFIX})