Skip to content

Commit

Permalink
cmake: Add powerpc64 toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Mar 11, 2022
1 parent 9cfb756 commit d12472a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ commands:
sudo apt -q update
sudo apt install -qy libgmp-dev
install_powerpc64:
steps:
- run:
name: "Install powerpc64 toolchain"
command: |
sudo apt -q update
sudo apt -qy install g++-powerpc64-linux-gnu qemu-user-static
check_code_format:
steps:
- run:
Expand Down Expand Up @@ -195,6 +203,15 @@ jobs:
- build_and_test
- benchmark

powerpc64:
environment:
BUILD_TYPE: Release
CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=~/project/cmake/toolchains/powerpc64.cmake -DINTX_BENCHMARKING=OFF
executor: linux-gcc-latest
steps:
- install_powerpc64
- build_and_test

arm64:
environment:
BUILD_TYPE: Release
Expand Down Expand Up @@ -299,3 +316,4 @@ workflows:
- macos
- cmake-min
- arm64
- powerpc64
15 changes: 15 additions & 0 deletions cmake/toolchains/powerpc64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Cable: CMake Bootstrap Library.
# Copyright 2018 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.

set(CMAKE_SYSTEM_PROCESSOR powerpc64)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH /usr/powerpc64-linux-gnu)
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_CROSSCOMPILING_EMULATOR qemu-ppc64-static;-L;${CMAKE_FIND_ROOT_PATH})

0 comments on commit d12472a

Please sign in to comment.