views:

14

answers:

0

Hey all,

I don't know if anyone of you've experienced this before, but I'm having trouble cross-compiling Mozilla's JavaScript engine, SpiderMonkey, on Linux. What I'm trying to accomplish is to compile 32-bit shared libraries on CentOS 5.4 x86_64. I'm using js-1.7.0. Here's the make command I used:

CFLAGS="-m32 -DCROSS_COMPILE=1" CXXFLAGS="-m32 -DCROSS_COMPILE=1" make JS_THREADSAFE=1 JS_DIST=/path/to/nspr OPT_BUILD=1 -f Makefile.ref

And here's the output I get:

gcc -o Linux_All_OPT.OBJ/jscpucfg.o -c -m32 -DCROSS_COMPILE=1 -Wall -Wno-format -O -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -fPIC  -UDEBUG -DNDEBUG -UDEBUG_root -DJS_THREADSAFE -DEDITLINE -ILinux_All_OPT.OBJ -I/root/workspace/lib/out/linux/glibc-2.5-42/release32/include/nspr  -Wall -Wno-format -O -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -fPIC  -UDEBUG -DNDEBUG -UDEBUG_root -DJS_THREADSAFE -DEDITLINE -ILinux_All_OPT.OBJ -I/root/workspace/lib/out/linux/glibc-2.5-42/release32/include/nspr  jscpucfg.c
gcc -o Linux_All_OPT.OBJ/jscpucfg Linux_All_OPT.OBJ/jscpucfg.o
/usr/bin/ld: warning: i386 architecture of input file `Linux_All_OPT.OBJ/jscpucfg.o' is incompatible with i386:x86-64 output
make[1]: Circular Linux_All_OPT.OBJ/jsautocfg.h <- Linux_All_OPT.OBJ/jsautocfg.h dependency dropped.
rm -f Linux_All_OPT.OBJ/jsautocfg.h
Linux_All_OPT.OBJ/jscpucfg > Linux_All_OPT.OBJ/jsautocfg.h
/bin/sh: line 1: 27847 Segmentation fault      Linux_All_OPT.OBJ/jscpucfg > Linux_All_OPT.OBJ/jsautocfg.h