Skip to content

Instantly share code, notes, and snippets.

@pgorczak
Created December 8, 2016 20:22
Show Gist options
  • Save pgorczak/a8c39d355de1b24153743a4707ff0a0a to your computer and use it in GitHub Desktop.
Save pgorczak/a8c39d355de1b24153743a4707ff0a0a to your computer and use it in GitHub Desktop.
Place this next to your linaro toolchain to cross compile for ARM
ROOT=$(realpath $(dirname $0))
LINARO=$ROOT/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf
# Use the toolchain
export BIN_PREFIX=$LINARO/bin/arm-linux-gnueabihf-
export CC=${BIN_PREFIX}gcc
export CXX=${BIN_PREFIX}g++
# Compile like $CXX hello_world.cpp -o hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment