Skip to content

Instantly share code, notes, and snippets.

@rc1
Last active November 23, 2015 10:49
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rc1/69b2c49d0efaebeafd08 to your computer and use it in GitHub Desktop.
Save rc1/69b2c49d0efaebeafd08 to your computer and use it in GitHub Desktop.
Building node.js for Raspberry Pi 2 (with Armv7 and Neon support)
export CC='gcc -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon'
export CXX='g++ -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon'
./configure --without-snapshot
make -j4
sudo make install
@cs8425
Copy link

cs8425 commented Mar 29, 2015

replace make by make -j4 will get a better building speed.

pi@raspberrypi ~/node-v0.12.1 $ time make -j4
...

real    29m33.923s
user    108m56.200s
sys 3m25.640s
pi@raspberrypi ~/node-v0.12.1 $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1) 

@rc1
Copy link
Author

rc1 commented Jun 29, 2015

@cs8425 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment