Skip to content

Instantly share code, notes, and snippets.

@joshmh
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshmh/906525b18c38e4f9ea3d to your computer and use it in GitHub Desktop.
Save joshmh/906525b18c38e4f9ea3d to your computer and use it in GitHub Desktop.
Cross compiling Node on Wheezy for ARM
apt-get install emdebian-archive-keyring
echo "deb http://ftp.us.debian.org/debian/ squeeze main" >> /etc/apt/sources.list.d/emdebian.list
echo "deb http://www.emdebian.org/debian/ squeeze main" >> /etc/apt/sources.list.d/emdebian.list
apt-get update
apt-get install binutils-arm-linux-gnueabi
apt-get install cpp-4.4-arm-linux-gnueabi
apt-get install g++-4.4-arm-linux-gnueabi
apt-get install gcc-4.4-base-armel-cross
apt-get install gcc-multilib g++-multilib
export AR=/usr/bin/arm-linux-gnueabi-ar
export CC=/usr/bin/arm-linux-gnueabi-gcc
export CXX=/usr/bin/arm-linux-gnueabi-g++
export LINK=/usr/bin/arm-linux-gnueabi-g++
./configure --without-snapshot --dest-cpu=arm --dest-os=linux
make CFLAGS+=-march=armv5t CXXFLAGS+=-march=armv5t -j4
file out/Release/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment