From 791c051246f5b82b419aca0ff61e82f7f610b4ce Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 2 Oct 2006 06:27:29 +0000 Subject: [PATCH] make spidermonkey build on OpenBSD git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2943 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/mozilla.build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/mozilla.build.sh b/libs/mozilla.build.sh index a1a3459a47..4a3accd183 100755 --- a/libs/mozilla.build.sh +++ b/libs/mozilla.build.sh @@ -1,5 +1,6 @@ hosttype=`uname -s` ldflags="" +cflags="" if [ $hosttype = "FreeBSD" ] ; then patch <<__EOF__ @@ -26,6 +27,8 @@ fi if [ $hosttype = "OpenBSD" ] ; then cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk +cflags="-DHAVE_VA_COPY -DVA_COPY=va_copy -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_INT" +ldflags="-lpthread" fi if [ $hosttype = "NetBSD" ] ; then @@ -37,9 +40,14 @@ arch=`uname -m` opts="" if [ $arch = "x86_64" ] ; then opts="--enable-64bit" +cflags="$cflags -fPIC" +fi +if [ $arch = "amd64" ] ; then +opts="--enable-64bit" +cflags="$cflags -fPIC" fi -cd nsprpub && LDFLAGS=$ldflags ./configure $opts && $MAKE +cd nsprpub && CFLAGS=$cflags LDFLAGS=$ldflags ./configure $opts && $MAKE -cd ../js/src && LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a` +cd ../js/src && CFLAGS=$cflags LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a`