Skip to content
Permalink
Browse files

Update documentation on cross-compiling

  • Loading branch information
franz committed Sep 7, 2016
1 parent 6b333ea commit fcd314b5382559e9e740574155e1442c1a031972
Showing with 16 additions and 6 deletions.
  1. +10 −6 ToolchainExample.cmake
  2. +6 −0 doc/sphinx/source/pocl_binary.rst
@@ -1,13 +1,17 @@
# This is an example Toolchain file to cross-compile for ARM
# or other boards from x86_64
# This is an example Toolchain file to cross-compile for ARM/MIPS/other
# boards from x86_64. Copy & modify
#
# Steps:
# 1) Install g++ and gcc cross-compilers (apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf)
# 1) Install g++ and gcc cross-compilers
# (apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf)
# 2) On your board, install libltdl, ocl-icd and libhwloc + their development headers
# 3) copy the entire root filesystem of the board somewhere on your host, then set CMAKE_FIND_ROOT_PATH to this path
# 3) copy the entire root filesystem of the board somewhere on your host,
then set CMAKE_FIND_ROOT_PATH below to this path
# 4) run cmake like this:
# cmake -DHOST_DEVICE_BUILD_HASH=<SOME_HASH> -DOCS_AVAILABLE=0
# -DCMAKE_TOOLCHAIN_FILE=<path-to-Toolchain.cmake>
# -DLLC_TRIPLE=arm-gnueabihf-linux-gnu -DLLC_HOST_CPU=armv7a
# -DCMAKE_TOOLCHAIN_FILE=<path-to-this-file>
# -DLLC_TRIPLE=<your-triple (e.g.arm-gnueabihf-linux-gnu)
# -DLLC_HOST_CPU=<your-cpu (e.g. armv7a)>
# <path-to-pocl-source>

SET(CMAKE_SYSTEM_NAME Linux)
@@ -29,6 +29,12 @@ The string after "HSTR:" is the device build hash.
This is required because pocl binaries contain a device hash, and the LLVM-less
pocl needs to know which binaries it can load.

Cross-compile pocl LLVM-less build
-----------------------------------
It's now possible to cross-compile pocl on x86-64 to run on ARM/MIPS/etc,
but only the LLVM-less build. There is a ToolchainExample.cmake file;
copy it under different name, then follow the instructions in the file.

Binary inputs format
--------------------

0 comments on commit fcd314b

Please sign in to comment.
You can’t perform that action at this time.