Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cross compiling with gyp

Does gyp support cross-compiling? If so are there any instuctions? If not, are there any tricks to get it to do cross compile anyways?

I am trying to use some of the chromium libraries and their build systems depend on gyp.

like image 377
l.thee.a Avatar asked Jul 14 '11 15:07

l.thee.a


1 Answers

For further reference, here is a possible solution to cross compile. It was taken from here

SYSROOT=/build/arm-generic/
CPPPATH=/build/arm-generic/usr/include/
LIBPATH=/build/arm-generic/usr/lib/
PKG_CONFIG_PATH=/build/arm-generic/usr/lib/pkgconfig/
AR=armv7a-cros-linux-gnueabi-ar
AS=armv7a-cros-linux-gnueabi-as
LD=armv7a-cros-linux-gnueabi-ld
NM=armv7a-cros-linux-gnueabi-nm
RANLIB=armv7a-cros-linux-gnueabi-ranlib
CC=armv7a-cros-linux-gnueabi-gcc
CXX=armv7a-cros-linux-gnueabi-g++
CPPDEFINES = 'NACL_BUILD_ARCH=arm'
CCFLAGS = '-fPIC'

No need to use them all ofc, just select what you need.

like image 125
jmpenetra Avatar answered Mar 04 '23 00:03

jmpenetra