Skip to content

Instantly share code, notes, and snippets.

@isofew
Created July 10, 2016 15:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isofew/e551a2af4cf7d09a3f0e0425155ae0d0 to your computer and use it in GitHub Desktop.
Save isofew/e551a2af4cf7d09a3f0e0425155ae0d0 to your computer and use it in GitHub Desktop.
cross-compile a standalone node.js runtime
#!/bin/sh
# subsitute the dest-cpu/os and CC/CXX/LINK/AR options with yours
cd /path/to/node
./configure \
--without-npm \
--without-snapshot \
--openssl-no-asm \
--fully-static \
--dest-cpu=arm \
--dest-os=linux &&
CC=arm-linux-gnueabi-gcc \
CXX=arm-linux-gnueabi-g++ \
LINK=arm-linux-gnueabi-g++ \
AR=arm-linux-gnueabi-ar \
make &&
file out/Release/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment