Hi ports --
I got devel/spidermonkey working on one of my loongson machines.
Builds/installs OK and 'make regress' passes all tests. That's as far as
I've gotten testing-wise.
I was subsequently able to build and install devel/libpeas and
x11/gnome/gjs without any problems or modifications to those ports.
Thanks.
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/spidermonkey/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 29 Sep 2012 07:17:47 -0000 1.7
+++ Makefile 25 Oct 2012 15:52:02 -0000
@@ -3,7 +3,7 @@
SHARED_ONLY= Yes
# 1.8.5 is based on ffx 10 engine, broken at runtime on sparc64
# but let's keep it to build more packages
-ONLY_FOR_ARCHS = amd64 i386 powerpc sparc64
+ONLY_FOR_ARCHS = amd64 i386 mips64el powerpc sparc64
COMMENT = Mozilla C implementation of JavaScript
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/devel/spidermonkey/patches/patch-Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Makefile_in
--- patches/patch-Makefile_in 7 Apr 2012 13:48:18 -0000 1.1.1.1
+++ patches/patch-Makefile_in 25 Oct 2012 15:52:02 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2012/04/07 13:48:18 landry Exp $
Don't do the horrible symlink dance
---- Makefile.in.orig Thu Mar 31 21:08:36 2011
-+++ Makefile.in Thu Apr 5 11:56:13 2012
+--- Makefile.in.orig Thu Mar 31 15:08:36 2011
++++ Makefile.in Sun Oct 21 18:05:44 2012
@@ -95,7 +95,7 @@ MODULE_OPTIMIZE_FLAGS = -O2 -ip
endif
else # not INTEL_CXX
@@ -43,7 +43,7 @@ Don't do the horrible symlink dance
endif
endif
-@@ -885,12 +886,6 @@ ifeq (,$(HOST_BIN_SUFFIX))
+@@ -885,13 +886,7 @@ ifeq (,$(HOST_BIN_SUFFIX))
@[ ! -h $(SHLIB_ANY_VER) ] || rm -f $(SHLIB_ANY_VER)
endif
$(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
@@ -52,7 +52,22 @@ Don't do the horrible symlink dance
- @[ ! -h $(SHLIB_ABI_VER) ] || rm -f $(SHLIB_ABI_VER)
- ln -s $(SHLIB_EXACT_VER) $(SHLIB_ABI_VER)
- ln -s $(SHLIB_ABI_VER) $(SHLIB_ANY_VER)
--endif
endif
+-endif
ifneq (,$(IMPORT_LIBRARY))
$(SYSINSTALL) $(IMPORT_LIBRARY) $(DESTDIR)$(libdir)
+ endif
+@@ -968,7 +963,13 @@ endif
+ # Needed to "configure" it correctly. Unfortunately these
+ # flags wind up being applied to all code in js/src, not just
+ # the code in js/src/assembler.
++
++# XXX: Fix for mips64el
++ifeq (mips, $(CPU_ARCH))
++CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=0 -DENABLE_JIT=0
++else
+ CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1
++endif
+
+ INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
+
Index: patches/patch-assembler_wtf_Platform_h
===================================================================
RCS file: patches/patch-assembler_wtf_Platform_h
diff -N patches/patch-assembler_wtf_Platform_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-assembler_wtf_Platform_h 25 Oct 2012 15:52:02 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+--- assembler/wtf/Platform.h.orig Sun Oct 21 17:14:40 2012
++++ assembler/wtf/Platform.h Sun Oct 21 17:19:58 2012
+@@ -121,6 +121,13 @@
+ #define WTF_CPU_IA64 1
+ #endif
+
++/* CPU(MIPS64) - MIPS64 (Loongson only!) */
++#if defined(__mips64__)
++#define WTF_CPU_MIPS64 1
++#define ENABLE_JIT 0
++#define ENABLE_ASSEMBLER 0
++#endif
++
+ /* CPU(PPC) - PowerPC 32-bit */
+ #if defined(__ppc__) \
+ || defined(__PPC__) \
Index: patches/patch-configure_in
===================================================================
RCS file: /cvs/ports/devel/spidermonkey/patches/patch-configure_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-configure_in
--- patches/patch-configure_in 7 Apr 2012 13:48:18 -0000 1.1.1.1
+++ patches/patch-configure_in 25 Oct 2012 15:52:02 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2012/04/07 13:48:18 landry Exp $
---- configure.in.orig Thu Mar 31 21:08:36 2011
-+++ configure.in Wed Apr 4 16:46:03 2012
+--- configure.in.orig Thu Mar 31 15:08:36 2011
++++ configure.in Sun Oct 21 17:45:38 2012
@@ -1211,7 +1211,7 @@ WIN_TOP_SRC=
MOZ_USER_DIR=".mozilla"
@@ -10,6 +10,24 @@ $OpenBSD: patch-configure_in,v 1.1.1.1 2
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
+@@ -1534,7 +1534,7 @@ arm*)
+ CPU_ARCH=arm
+ ;;
+
+-mips|mipsel)
++mips*)
+ CPU_ARCH="mips"
+ ;;
+ esac
+@@ -2515,7 +2515,7 @@ ia64*-hpux*)
+ alpha-*)
+ AC_DEFINE(_ALPHA_)
+ ;;
+- mips-*)
++ mips*-*)
+ AC_DEFINE(_MIPS_)
+ ;;
+ x86_64-*)
@@ -2582,7 +2582,7 @@ ia64*-hpux*)
;;