Add patches to let mozilla-firefox 4.0 at least build on sparc64.

- disable tracejit/methodjit
- add fix for https://bugzilla.mozilla.org/show_bug.cgi?id=618485
- add fix for https://bugzilla.mozilla.org/show_bug.cgi?id=589754
- don't force-enable assembler/jit on sparc64

It still doesn't run (endless loop at startup) due to 64-bits
jsval_layout (see https://bugzilla.mozilla.org/show_bug.cgi?id=577056)
but at least patches are in cvs, and the js shell can run simple things.
No change for other archs.
This commit is contained in:
landry 2011-04-05 09:00:42 +00:00
parent 6226ab028d
commit 20acf0c075
4 changed files with 59 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.173 2011/03/30 21:39:14 landry Exp $
# $OpenBSD: Makefile,v 1.174 2011/04/05 09:00:42 landry Exp $
COMMENT = Mozilla web browser
BROKEN-sparc64 = https://bugzilla.mozilla.org/show_bug.cgi?id=577056
@ -41,6 +41,10 @@ CONFIGURE_ARGS += --with-system-libevent=/usr/
CONFIGURE_ARGS += --with-system-zlib=/usr/ --with-system-bz2=${LOCALBASE}
WANTLIB += event
.if ${MACHINE_ARCH:Msparc64}
CONFIGURE_ARGS += --disable-tracejit --disable-methodjit
.endif
# --with-system-png=${LOCALBASE}
# no system png : apng support not bundled in

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-js_src_Makefile_in,v 1.1 2011/04/05 09:00:42 landry Exp $
Fix build error on sparc64, we dont want to force-enable assembler/jit
--- js/src/Makefile.in.orig Thu Mar 3 23:11:32 2011
+++ js/src/Makefile.in Sun Mar 13 11:34:19 2011
@@ -914,7 +914,11 @@ 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.
+ifneq (,$(filter-out sparc64,$(TARGET_CPU)))
CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1
+else
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
+endif
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-js_src_configure_in,v 1.2 2011/03/30 21:39:14 landry Exp $
--- js/src/configure.in.orig Wed Feb 23 06:53:34 2011
+++ js/src/configure.in Sat Feb 26 09:25:34 2011
$OpenBSD: patch-js_src_configure_in,v 1.3 2011/04/05 09:00:42 landry Exp $
https://bugzilla.mozilla.org/show_bug.cgi?id=589754
--- js/src/configure.in.orig Thu Mar 3 23:11:32 2011
+++ js/src/configure.in Sun Mar 13 11:35:50 2011
@@ -1211,7 +1211,7 @@ WIN_TOP_SRC=
MOZ_USER_DIR=".mozilla"
@ -19,7 +20,27 @@ $OpenBSD: patch-js_src_configure_in,v 1.2 2011/03/30 21:39:14 landry Exp $
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-fPIC'
DSO_LDOPTS='-shared -fPIC'
@@ -3039,6 +3039,9 @@ case "$target" in
@@ -2956,7 +2956,7 @@ arm*-*)
AC_DEFINE(JS_CPU_ARM)
AC_DEFINE(JS_NUNBOX32)
;;
-sparc*-*)
+sparc-*)
ENABLE_TRACEJIT=1
NANOJIT_ARCH=Sparc
AC_DEFINE(JS_CPU_SPARC)
@@ -3025,6 +3025,10 @@ arm*-*)
sparc-*)
AC_DEFINE(AVMPLUS_SPARC)
;;
+sparc64-*)
+ AC_DEFINE(AVMPLUS_SPARC)
+ AC_DEFINE(AVMPLUS_64BIT)
+ ;;
esac
case "$target" in
@@ -3039,6 +3043,9 @@ case "$target" in
AC_DEFINE(AVMPLUS_UNIX)
;;
*-freebsd*|*-kfreebsd*)

View File

@ -1,8 +1,17 @@
$OpenBSD: patch-js_src_jsval_h,v 1.1 2011/03/30 21:39:14 landry Exp $
$OpenBSD: patch-js_src_jsval_h,v 1.2 2011/04/05 09:00:42 landry Exp $
https://bugzilla.mozilla.org/show_bug.cgi?id=599764
--- js/src/jsval.h.orig Tue Jan 11 04:26:08 2011
+++ js/src/jsval.h Sat Jan 15 01:03:03 2011
@@ -815,7 +815,7 @@ extern "C++"
https://bugzilla.mozilla.org/show_bug.cgi?id=618485
--- js/src/jsval.h.orig Thu Feb 3 21:11:50 2011
+++ js/src/jsval.h Thu Feb 17 20:36:07 2011
@@ -347,6 +347,7 @@ typedef union jsval_layout
int32 i32;
uint32 u32;
JSWhyMagic why;
+ jsuword word;
} payload;
} s;
double asDouble;
@@ -815,7 +816,7 @@ extern "C++"
#else /* defined(JS_USE_JSVAL_JSID_STRUCT_TYPES) */
/* Use different primitive types so overloading works. */