GithubHelp home page GithubHelp logo

toolchain's Introduction

toolchain

A collection of cross-compilation toolchains

Build machine

  • OS: CentOS-7.9.2009
  • Arch: amd64
  • Glibc: 2.17

Target machines

powerpc64-linux-gnu

  • OS: Linux
  • Kernel: 3.10.0-1160
  • Arch: powerpc64
  • Glibc: 2.17
  • Binutils: 2.27
  • GCC: 4.9.4
  • CrossPrefix: powerpc64-linux-gnu-
  • InstallPath: /opt/powerpc64-linux-gnu

powerpc64le-linux-gnu

  • OS: Linux
  • Kernel: 3.10.0-1160
  • Arch: powerpc64le
  • Glibc: 2.17
  • Binutils: 2.27
  • GCC: 4.9.4
  • CrossPrefix: powerpc64le-linux-gnu-
  • InstallPath: /opt/powerpc64le-linux-gnu

Usage

Makefile

docker run --rm -it fjzhangzzz/toolchain:latest \
    make CC=powerpc64-linux-gnu-gcc CXX=powerpc64-linux-gnu-g++ LD=powerpc64-linux-gnu-ld \
         -f /path/to/your/Makefile

CMake

$ vi powerpc64-linux-gnu.toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR powerpc64)

set(TOOLCHAIN /opt/powerpc64-linux-gnu)
set(CMAKE_SYSROOT${TOOLCHAIN}/sysroot)
set(CMAKE_C_COMPILER ${TOOLCHAIN}/usr/bin/powerpc64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN}/usr/bin/powerpc64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/sysroot)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

$ mkdir build && cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=powerpc64-linux-gnu.toolchain.cmake ..
$ make

Links

toolchain's People

Contributors

fjzhangzzzzzz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.