Updated lang/spidermonkey to 1.8.0 rc1 (see below). No standard changelog provided from upstream, some bits scattered here: * http://www.mozilla.org/js/spidermonkey/release-notes/JS_170.html * https://developer.mozilla.org/En/SpiderMonkey/1.8 pkgsrc changes: * Threading support (and dependency on devel/nspr) is now optional (enabled by default). Threaded Spidermonkey may not be desirable for e.g. server-side JavaScript usage. * Unicode strings support optional. * Rudimental OpenSolaris/Solaris 11 config file provided. Release Candidate note: Spidermonkey 1.8.0 RC1 was the last version ever released as a standalone distribution, and is generally being used by the JavaScript community nowaways, if needed. In the future, ripping Spidermonkey out of the Mozilla tarball may be attempted too, to update the package to 1.9.x.diff -r1.19 -r1.20 pkgsrc/lang/spidermonkey/Makefile
(fhajny)
@@ -1,67 +1,65 @@ | @@ -1,67 +1,65 @@ | |||
1 | # $NetBSD: Makefile,v 1.19 2010/01/16 15:04:32 tnn Exp $ | 1 | # $NetBSD: Makefile,v 1.20 2010/12/23 12:36:01 fhajny Exp $ | |
2 | 2 | |||
3 | DISTNAME= js-1.60 | 3 | DISTNAME= js-1.8.0-rc1 | |
4 | PKGNAME= ${DISTNAME:S/js/spidermonkey/} | 4 | PKGNAME= spidermonkey-1.8.0rc1 | |
5 | PKGREVISION= 3 | |||
6 | CATEGORIES= lang | 5 | CATEGORIES= lang | |
7 | MASTER_SITES= ${MASTER_SITE_MOZILLA:=js/} | 6 | MASTER_SITES= ${MASTER_SITE_MOZILLA:=js/} | |
8 | 7 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.mozilla.org/js/spidermonkey/ | 9 | HOMEPAGE= http://www.mozilla.org/js/spidermonkey/ | |
11 | COMMENT= Standalone JavaScript implementation in C | 10 | COMMENT= Standalone JavaScript implementation in C | |
12 | 11 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 13 | |||
15 | WRKSRC= ${WRKDIR}/js/src | 14 | WRKSRC= ${WRKDIR}/js/src | |
16 | 15 | |||
17 | MAKE_JOBS_SAFE= no | 16 | MAKE_JOBS_SAFE= no | |
18 | 17 | |||
19 | NO_CONFIGURE= yes | 18 | NO_CONFIGURE= yes | |
20 | USE_TOOLS+= gmake pkg-config | 19 | USE_TOOLS+= gmake pkg-config | |
21 | MAKE_FILE= Makefile.ref | 20 | MAKE_FILE= Makefile.ref | |
22 | CFLAGS+= -DJS_USE_FDLIBM_MATH=0 | 21 | CFLAGS+= -DJS_USE_FDLIBM_MATH=0 | |
23 | 22 | |||
24 | # JS_THREADSAFE | 23 | MAKE_FLAGS+= BUILD_OPT=1 LDFLAGS=${LDFLAGS:Q} PREFIX=${PREFIX:Q} | |
25 | PTHREAD_AUTO_VARS= yes | |||
26 | MAKE_FLAGS+= BUILD_OPT=1 LDFLAGS=${LDFLAGS:Q} PREFIX=${PREFIX:Q} | |||
27 | 24 | |||
28 | INSTALLATION_DIRS= bin include lib | 25 | INSTALLATION_DIRS= bin include lib | |
29 | 26 | |||
30 | DIST_HEADERS= jsapi.h jsautocfg.h jscompat.h jslong.h \ | |||
31 | jsosdep.h jsotypes.h jspubtd.h jstypes.h | |||
32 | ||||
33 | .include "../../mk/bsd.prefs.mk" | 27 | .include "../../mk/bsd.prefs.mk" | |
34 | 28 | |||
35 | .if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || \ | 29 | .if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || \ | |
36 | ${OPSYS} == "DragonFly" || ${OPSYS} == "OpenBSD" | 30 | ${OPSYS} == "DragonFly" || ${OPSYS} == "OpenBSD" | |
37 | BUILDDIRPREFIX= pkgsrc | 31 | BUILDDIRPREFIX= pkgsrc | |
38 | .elif ${OPSYS} == "Linux" | 32 | .elif ${OPSYS} == "Linux" | |
39 | BUILDDIRPREFIX= Linux_All | 33 | BUILDDIRPREFIX= Linux_All | |
34 | .elif ${OPSYS} == "SunOS" | |||
35 | SUN_PLATFORM!= ${UNAME} -i | |||
36 | BUILDDIRPREFIX= ${OPSYS}${OS_VERSION}_${SUN_PLATFORM} | |||
40 | .else | 37 | .else | |
41 | BUILDDIRPREFIX= ${OPSYS} | 38 | BUILDDIRPREFIX= ${OPSYS} | |
42 | .endif | 39 | .endif | |
43 | 40 | |||
44 | .if ${OPSYS} == "Darwin" | 41 | .if ${OPSYS} == "Darwin" | |
45 | SO_SUFFIX=dylib | 42 | SO_SUFFIX=dylib | |
46 | .else | 43 | .else | |
47 | SO_SUFFIX=so | 44 | SO_SUFFIX=so | |
48 | .endif | 45 | .endif | |
49 | PLIST_SUBST+= SO_SUFFIX=${SO_SUFFIX} | 46 | PLIST_SUBST+= SO_SUFFIX=${SO_SUFFIX} | |
50 | 47 | |||
48 | .include "options.mk" | |||
49 | ||||
51 | post-extract: | 50 | post-extract: | |
52 | ${CP} ${FILESDIR}/pkgsrc.mk ${WRKSRC}/config | 51 | ${CP} ${FILESDIR}/pkgsrc.mk ${WRKSRC}/config | |
52 | ${CP} ${FILESDIR}/opensolaris.mk ${WRKSRC}/config/${BUILDDIRPREFIX}.mk | |||
53 | ${RM} ${WRKSRC}/lock_SunOS.s | |||
53 | 54 | |||
54 | do-install: | 55 | do-install: | |
55 | ${INSTALL_PROGRAM} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/js \ | 56 | ${INSTALL_PROGRAM} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/js \ | |
56 | ${DESTDIR}${PREFIX}/bin | 57 | ${DESTDIR}${PREFIX}/bin | |
57 | ${INSTALL_LIB} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/libjs.${SO_SUFFIX} \ | 58 | ${INSTALL_LIB} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/libjs.${SO_SUFFIX} \ | |
58 | ${DESTDIR}${PREFIX}/lib | 59 | ${DESTDIR}${PREFIX}/lib | |
59 | ${CP} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/jsautocfg.h ${WRKSRC} | 60 | ${CP} ${WRKSRC}/${BUILDDIRPREFIX}_OPT.OBJ/jsautocfg.h ${WRKSRC} | |
60 | .for f in ${DIST_HEADERS} | 61 | ${INSTALL_DATA} ${WRKSRC}/*.h ${DESTDIR}${PREFIX}/include | |
61 | ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/include | 62 | ${INSTALL_DATA} ${WRKSRC}/*.tbl ${DESTDIR}${PREFIX}/include | |
62 | .endfor | |||
63 | 63 | |||
64 | .include "../../devel/nspr/buildlink3.mk" | |||
65 | .include "../../devel/readline/buildlink3.mk" | 64 | .include "../../devel/readline/buildlink3.mk" | |
66 | .include "../../mk/pthread.buildlink3.mk" | |||
67 | .include "../../mk/bsd.pkg.mk" | 65 | .include "../../mk/bsd.pkg.mk" |
@@ -1,11 +1,56 @@ | @@ -1,11 +1,56 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2006/08/08 09:50:33 tron Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2010/12/23 12:36:01 fhajny Exp $ | |
2 | bin/js | 2 | bin/js | |
3 | include/jsapi.h | 3 | include/jsapi.h | |
4 | include/jsarena.h | |||
5 | include/jsarray.h | |||
6 | include/jsatom.h | |||
4 | include/jsautocfg.h | 7 | include/jsautocfg.h | |
8 | include/jsbit.h | |||
9 | include/jsbool.h | |||
10 | include/jsclist.h | |||
11 | include/jscntxt.h | |||
5 | include/jscompat.h | 12 | include/jscompat.h | |
13 | include/jsconfig.h | |||
14 | include/jscpucfg.h | |||
15 | include/jsdate.h | |||
16 | include/jsdbgapi.h | |||
17 | include/jsdhash.h | |||
18 | include/jsdtoa.h | |||
19 | include/jsdtracef.h | |||
20 | include/jsemit.h | |||
21 | include/jsexn.h | |||
22 | include/jsfile.h | |||
23 | include/jsfun.h | |||
24 | include/jsgc.h | |||
25 | include/jshash.h | |||
26 | include/jsinterp.h | |||
27 | include/jsiter.h | |||
28 | include/jskeyword.tbl | |||
29 | include/jslibmath.h | |||
30 | include/jslock.h | |||
6 | include/jslong.h | 31 | include/jslong.h | |
7 | include/jsosdep.h | 32 | include/jsmath.h | |
33 | include/jsnum.h | |||
34 | include/jsobj.h | |||
35 | include/jsopcode.h | |||
36 | include/jsopcode.tbl | |||
8 | include/jsotypes.h | 37 | include/jsotypes.h | |
38 | include/jsparse.h | |||
39 | include/jsprf.h | |||
40 | include/jsproto.tbl | |||
41 | include/jsprvtd.h | |||
9 | include/jspubtd.h | 42 | include/jspubtd.h | |
43 | include/jsregexp.h | |||
44 | include/jsreops.tbl | |||
45 | include/jsscan.h | |||
46 | include/jsscope.h | |||
47 | include/jsscript.h | |||
48 | include/jsstddef.h | |||
49 | include/jsstr.h | |||
10 | include/jstypes.h | 50 | include/jstypes.h | |
51 | include/jsutil.h | |||
52 | include/jsxdrapi.h | |||
53 | include/jsxml.h | |||
54 | include/prmjtime.h | |||
55 | include/resource.h | |||
11 | lib/libjs.${SO_SUFFIX} | 56 | lib/libjs.${SO_SUFFIX} |
@@ -1,14 +1,11 @@ | @@ -1,14 +1,11 @@ | |||
1 | $NetBSD: distinfo,v 1.10 2010/01/16 15:04:32 tnn Exp $ | 1 | $NetBSD: distinfo,v 1.11 2010/12/23 12:36:01 fhajny Exp $ | |
2 | 2 | |||
3 | SHA1 (js-1.60.tar.gz) = db1457c28d2a55080520d7565a2c271eb1599064 | 3 | SHA1 (js-1.8.0-rc1.tar.gz) = 1577bd39a2ebd9f5e2ec90e72d9a6aa85f840564 | |
4 | RMD160 (js-1.60.tar.gz) = 630e0f5606d9cc398daa41e71ca3f98c04e3aed2 | 4 | RMD160 (js-1.8.0-rc1.tar.gz) = 27c6cba1185d34cb9095d2da67393025bfe673ca | |
5 | Size (js-1.60.tar.gz) = 1081150 bytes | 5 | Size (js-1.8.0-rc1.tar.gz) = 1310344 bytes | |
6 | SHA1 (patch-aa) = bdd0e741483c5261837948b288c68d040c95e2a9 | 6 | SHA1 (patch-aa) = fc4b759bc420b76f349c4669dbba378a756038b9 | |
7 | SHA1 (patch-ab) = 1ea712aa7a8d2d48acf4980db3df74f70e616252 | 7 | SHA1 (patch-ab) = 497401caa31380869d3f56ce076f6b7d27b7f941 | |
8 | SHA1 (patch-ac) = 75ccc29f5075d95b087b28dba25fb8ee78cee706 | 8 | SHA1 (patch-ac) = 1a3458862fe3186d24add4791d41df76d742b474 | |
9 | SHA1 (patch-ad) = ca651bfc31b5ad06e45010d40309121c7300807a | 9 | SHA1 (patch-ad) = ca651bfc31b5ad06e45010d40309121c7300807a | |
10 | SHA1 (patch-ae) = 5ac0c7013fe4290fc770c91bc2db438f17481f5e | 10 | SHA1 (patch-ae) = c39412d59480db7c89aed7e555f2a5e7a4cea80b | |
11 | SHA1 (patch-af) = 353a2b119f56974cc1ae0c2a646d014c075eb5fd | 11 | SHA1 (patch-ai) = 1112dca0f459d98ab1b1a84b4c4ff7ce654b1821 | |
12 | SHA1 (patch-ah) = a8a486353bc164cff0ba57efc6ad4e82ff339e3e | |||
13 | SHA1 (patch-ai) = 5835ce03309d45f607a1613062b609e39cc1b974 | |||
14 | SHA1 (patch-aj) = f63d5ef988e3bda111af78f68152019abd0b1ac9 |
# $NetBSD: options.mk,v 1.1 2010/12/23 12:36:01 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.spidermonkey
PKG_SUPPORTED_OPTIONS= threads unicode
PKG_SUGGESTED_OPTIONS= threads
.include "../../mk/bsd.options.mk"
###
### Threads support
###
.if !empty(PKG_OPTIONS:Mthreads)
PTHREAD_AUTO_VARS= yes
CFLAGS+= -DJS_THREADSAFE
.include "../../devel/nspr/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.endif
###
### UTF8 string support
###
.if !empty(PKG_OPTIONS:Municode)
CFLAGS+= -DJS_C_STRINGS_ARE_UTF8
.endif
# -*- Mode: makefile -*-
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
# Config stuff for SunOS5.5
#
#AS = /usr/sfw/bin/gas
AS = gcc
#CC = gcc
#CCC = g++
CFLAGS += -Wall -Wno-format
#else
#CC = cc
#CCC = CC
#endif
RANLIB = echo
#.c.o:
# $(CC) -c -MD $*.d $(CFLAGS) $<
CPU_ARCH = x86_64
GFX_ARCH = x
OS_CFLAGS = -DXP_UNIX -DSYSV -DSOLARIS -DHAVE_LOCALTIME_R
OS_LIBS = -lsocket -lnsl -ldl
#ASFLAGS += -P -L -K PIC -D_ASM -D__STDC__=0
ASFLAGS += -x assembler-with-cpp
HAVE_PURIFY = 1
NOSUCHFILE = /solaris-rm-f-sucks
MKSHLIB = $(LD) -G
# Use the editline library to provide line-editing support.
JS_EDITLINE = 1
ifeq ($(CPU_ARCH),x86_64)
# Use VA_COPY() standard macro on x86-64
# FIXME: better use it everywhere
OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy
endif
ifeq ($(CPU_ARCH),x86_64)
# We need PIC code for shared libraries
# FIXME: better patch rules.mk & fdlibm/Makefile*
OS_CFLAGS += -DPIC -fPIC
endif
#JS_USE_FDLIBM_MATH=1
@@ -34,28 +34,29 @@ | @@ -34,28 +34,29 @@ | |||
34 | # and other provisions required by the GPL or the LGPL. If you do not delete | 34 | # and other provisions required by the GPL or the LGPL. If you do not delete | |
35 | # the provisions above, a recipient may use your version of this file under | 35 | # the provisions above, a recipient may use your version of this file under | |
36 | # the terms of any one of the MPL, the GPL or the LGPL. | 36 | # the terms of any one of the MPL, the GPL or the LGPL. | |
37 | # | 37 | # | |
38 | # ***** END LICENSE BLOCK ***** | 38 | # ***** END LICENSE BLOCK ***** | |
39 | 39 | |||
40 | # | 40 | # | |
41 | # Config for FreeBSD/NetBSD/OpenBSD. | 41 | # Config for FreeBSD/NetBSD/OpenBSD. | |
42 | # | 42 | # | |
43 | 43 | |||
44 | #CC = gcc | 44 | #CC = gcc | |
45 | #CCC = g++ | 45 | #CCC = g++ | |
46 | CFLAGS+= -Wall -Wno-format | 46 | CFLAGS+= -Wall -Wno-format | |
47 | OS_CFLAGS= -DJS_THREADSAFE -DXP_UNIX -DSVR4 | 47 | OS_CFLAGS= -DXP_UNIX -DSVR4 | |
48 | OS_CFLAGS+= -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE # -DHAVE_LOCALTIME_R | 48 | OS_CFLAGS+= -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE # -DHAVE_LOCALTIME_R | |
49 | INTERP_CFLAGS+= `pkg-config --cflags-only-I nspr` | |||
49 | 50 | |||
50 | RANLIB = echo | 51 | RANLIB = echo | |
51 | MKSHLIB = $(LD) -lm `pkg-config --libs nspr` -shared $(LDFLAGS) $(XMKSHLIBOPTS) | 52 | MKSHLIB = $(LD) -lm `pkg-config --libs nspr` -shared $(LDFLAGS) $(XMKSHLIBOPTS) | |
52 | 53 | |||
53 | #.c.o: | 54 | #.c.o: | |
54 | # $(CC) -c -MD $*.d $(CFLAGS) $< | 55 | # $(CC) -c -MD $*.d $(CFLAGS) $< | |
55 | 56 | |||
56 | CPU_ARCH = $(shell uname -m) | 57 | CPU_ARCH = $(shell uname -m) | |
57 | # don't filter in x86-64 architecture | 58 | # don't filter in x86-64 architecture | |
58 | ifneq (amd64,$(CPU_ARCH)) | 59 | ifneq (amd64,$(CPU_ARCH)) | |
59 | ifeq (86,$(findstring 86,$(CPU_ARCH))) | 60 | ifeq (86,$(findstring 86,$(CPU_ARCH))) | |
60 | CPU_ARCH = x86 | 61 | CPU_ARCH = x86 | |
61 | OS_CFLAGS+= -DX86_LINUX | 62 | OS_CFLAGS+= -DX86_LINUX |
@@ -1,52 +1,43 @@ | @@ -1,52 +1,43 @@ | |||
1 | $NetBSD: patch-aa,v 1.4 2007/08/12 03:04:32 wiz Exp $ | 1 | $NetBSD: patch-aa,v 1.5 2010/12/23 12:36:02 fhajny Exp $ | |
2 | 2 | |||
3 | --- config.mk.orig 2003-11-14 19:10:55.000000000 -0500 | 3 | --- config.mk.orig 2008-03-12 14:36:06.000000000 +0000 | |
4 | +++ config.mk | 4 | +++ config.mk | |
5 | @@ -96,10 +96,26 @@ else | 5 | @@ -100,10 +100,26 @@ else | |
6 | ifeq ($(OS_ARCH),Darwin) | 6 | ifeq ($(OS_ARCH),Darwin) | |
7 | OS_CONFIG := Darwin | 7 | OS_CONFIG := Darwin | |
8 | else | 8 | else | |
9 | +ifeq ($(OS_ARCH), NetBSD) | 9 | +ifeq ($(OS_ARCH), NetBSD) | |
10 | +OS_CONFIG := pkgsrc | 10 | +OS_CONFIG := pkgsrc | |
11 | +else | 11 | +else | |
12 | +ifeq ($(OS_ARCH), FreeBSD) | 12 | +ifeq ($(OS_ARCH), FreeBSD) | |
13 | +OS_CONFIG := pkgsrc | 13 | +OS_CONFIG := pkgsrc | |
14 | +else | 14 | +else | |
15 | +ifeq ($(OS_ARCH), DragonFly) | 15 | +ifeq ($(OS_ARCH), DragonFly) | |
16 | +OS_CONFIG := pkgsrc | 16 | +OS_CONFIG := pkgsrc | |
17 | +else | 17 | +else | |
18 | +ifeq ($(OS_ARCH), OpenBSD) | 18 | +ifeq ($(OS_ARCH), OpenBSD) | |
19 | +OS_CONFIG := pkgsrc | 19 | +OS_CONFIG := pkgsrc | |
20 | +else | 20 | +else | |
21 | OS_CONFIG := $(OS_ARCH)$(OS_OBJTYPE)$(OS_RELEASE) | 21 | OS_CONFIG := $(OS_ARCH)$(OS_OBJTYPE)$(OS_RELEASE) | |
22 | endif | 22 | endif | |
23 | endif | 23 | endif | |
24 | endif | 24 | endif | |
25 | +endif | 25 | +endif | |
26 | +endif | 26 | +endif | |
27 | +endif | 27 | +endif | |
28 | +endif | 28 | +endif | |
29 | 29 | |||
30 | ASFLAGS = | 30 | ASFLAGS = | |
31 | DEFINES = | 31 | DEFINES = | |
32 | @@ -113,7 +129,7 @@ CP = cp | 32 | @@ -139,7 +155,11 @@ DEFINES += -DDEBUG -DDEBUG_$(USER) | |
33 | endif | |||
34 | ||||
35 | ifdef BUILD_OPT | |||
36 | -OPTIMIZER = -O | |||
37 | +#OPTIMIZER = | |||
38 | DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami) | |||
39 | OBJDIR_TAG = _OPT | |||
40 | else | |||
41 | @@ -126,7 +142,11 @@ DEFINES += -DDEBUG -DDEBUG_$(shell wh | |||
42 | OBJDIR_TAG = _DBG | 33 | OBJDIR_TAG = _DBG | |
43 | endif | 34 | endif | |
44 | 35 | |||
45 | +ifeq ($(OS_ARCH),Darwin) | 36 | +ifeq ($(OS_ARCH),Darwin) | |
46 | +SO_SUFFIX = dylib | 37 | +SO_SUFFIX = dylib | |
47 | +else | 38 | +else | |
48 | SO_SUFFIX = so | 39 | SO_SUFFIX = so | |
49 | +endif | 40 | +endif | |
50 | 41 | |||
51 | NS_USE_NATIVE = 1 | 42 | NS_USE_NATIVE = 1 | |
52 | 43 |
@@ -1,31 +1,22 @@ | @@ -1,31 +1,22 @@ | |||
1 | $NetBSD: patch-ab,v 1.3 2007/08/12 03:04:33 wiz Exp $ | 1 | $NetBSD: patch-ab,v 1.4 2010/12/23 12:36:02 fhajny Exp $ | |
2 | 2 | |||
3 | --- js.c.orig 2006-11-29 19:34:45.000000000 -0500 | 3 | --- js.c.orig 2008-04-11 22:24:55.000000000 +0000 | |
4 | +++ js.c | 4 | +++ js.c | |
5 | @@ -900,7 +900,7 @@ SrcNotes(JSContext *cx, JSScript *script | 5 | @@ -1233,7 +1233,7 @@ SrcNotes(JSContext *cx, JSScript *script | |
6 | for (sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) { | 6 | JS_ASSERT(script->code[offset] == JSOP_NOP); | |
7 | delta = SN_DELTA(sn); | 7 | } | |
8 | offset += delta; | 8 | } | |
9 | - fprintf(gOutFile, "%3u: %5u [%4u] %-8s", | 9 | - fprintf(gOutFile, "%3u: %5u [%4u] %-8s", | |
10 | + fprintf(gOutFile, "%3tu: %5u [%4u] %-8s", | 10 | + fprintf(gOutFile, "%3tu: %5u [%4u] %-8s", | |
11 | PTRDIFF(sn, notes, jssrcnote), offset, delta, | 11 | PTRDIFF(sn, notes, jssrcnote), offset, delta, name); | |
12 | js_SrcNoteSpec[SN_TYPE(sn)].name); | 12 | switch (type) { | |
13 | type = (JSSrcNoteType) SN_TYPE(sn); | 13 | case SRC_SETLINE: | |
14 | @@ -985,7 +985,7 @@ TryNotes(JSContext *cx, JSScript *script | 14 | @@ -1558,7 +1558,7 @@ DumpScope(JSContext *cx, JSObject *obj, | |
15 | return JS_TRUE; | |||
16 | fprintf(gOutFile, "\nException table:\nstart\tend\tcatch\n"); | |||
17 | while (tn->start && tn->catchStart) { | |||
18 | - fprintf(gOutFile, " %d\t%d\t%d\n", | |||
19 | + fprintf(gOutFile, " %td\t%td\t%td\n", | |||
20 | tn->start, tn->start + tn->length, tn->catchStart); | |||
21 | tn++; | |||
22 | } | |||
23 | @@ -1205,7 +1205,7 @@ DumpScope(JSContext *cx, JSObject *obj, | |||
24 | DUMP_ATTR(SETTER); | 15 | DUMP_ATTR(SETTER); | |
25 | #undef DUMP_ATTR | 16 | #undef DUMP_ATTR | |
26 | 17 | |||
27 | - fprintf(fp, " slot %lu flags %x shortid %d\n", | 18 | - fprintf(fp, " slot %lu flags %x shortid %d\n", | |
28 | + fprintf(fp, " slot %u flags %x shortid %d\n", | 19 | + fprintf(fp, " slot %u flags %x shortid %d\n", | |
29 | sprop->slot, sprop->flags, sprop->shortid); | 20 | (unsigned long)sprop->slot, sprop->flags, sprop->shortid); | |
30 | } | 21 | } | |
31 | } | 22 | } |
@@ -1,44 +1,44 @@ | @@ -1,44 +1,44 @@ | |||
1 | $NetBSD: patch-ac,v 1.3 2007/08/12 03:04:33 wiz Exp $ | 1 | $NetBSD: patch-ac,v 1.4 2010/12/23 12:36:02 fhajny Exp $ | |
2 | 2 | |||
3 | --- config/Darwin.mk.orig 2005-02-12 15:10:33.000000000 -0500 | 3 | --- config/Darwin.mk.orig 2008-03-02 23:10:49.000000000 +0000 | |
4 | +++ config/Darwin.mk | 4 | +++ config/Darwin.mk | |
5 | @@ -43,13 +43,13 @@ | 5 | @@ -43,13 +43,13 @@ | |
6 | # Just ripped from Linux config | 6 | # Just ripped from Linux config | |
7 | # | 7 | # | |
8 | 8 | |||
9 | -CC = cc | 9 | -CC = cc | |
10 | +CC = gcc | 10 | +CC = gcc | |
11 | CCC = g++ | 11 | CCC = g++ | |
12 | -CFLAGS += -Wall -Wno-format | 12 | -CFLAGS += -Wall -Wno-format -MMD | |
13 | -OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN | 13 | -OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN | |
14 | +CFLAGS += -Wall -Wno-format -no-cpp-precomp -fno-common -pipe | 14 | +CFLAGS += -Wall -Wno-format -MMD -no-cpp-precomp -fno-common -pipe | |
15 | +OS_CFLAGS = -DJS_THREADSAFE -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN | 15 | +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN | |
16 | 16 | |||
17 | RANLIB = ranlib | 17 | RANLIB = ranlib | |
18 | -MKSHLIB = libtool $(XMKSHLIBOPTS) -framework System | 18 | -MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System | |
19 | +MKSHLIB = $(CC) -framework System -dynamiclib $(XMKSHLIBOPTS) -lm -lplds4 -lplc4 -lnspr4 $(LDFLAGS) | 19 | +MKSHLIB = $(CC) -dynamiclib $(XMKSHLIBOPTS) -framework System -lm -lplds4 -lplc4 -lnspr4 $(LDFLAGS) | |
20 | 20 | |||
21 | #.c.o: | 21 | SO_SUFFIX = dylib | |
22 | # $(CC) -c -MD $*.d $(CFLAGS) $< | 22 | ||
23 | @@ -57,7 +57,6 @@ MKSHLIB = libtool $(XMKSHLIBOPTS) -frame | 23 | @@ -59,7 +59,6 @@ SO_SUFFIX = dylib | |
24 | CPU_ARCH = $(shell uname -m) | 24 | CPU_ARCH = $(shell uname -m) | |
25 | ifeq (86,$(findstring 86,$(CPU_ARCH))) | 25 | ifeq (86,$(findstring 86,$(CPU_ARCH))) | |
26 | CPU_ARCH = x86 | 26 | CPU_ARCH = x86 | |
27 | -OS_CFLAGS+= -DX86_LINUX | 27 | -OS_CFLAGS+= -DX86_LINUX | |
28 | endif | 28 | endif | |
29 | GFX_ARCH = x | 29 | GFX_ARCH = x | |
30 | 30 | |||
31 | @@ -65,14 +64,6 @@ OS_LIBS = -lc -framework System | 31 | @@ -67,14 +66,6 @@ OS_LIBS = -lc -framework System | |
32 | 32 | |||
33 | ASFLAGS += -x assembler-with-cpp | 33 | ASFLAGS += -x assembler-with-cpp | |
34 | 34 | |||
35 | -ifeq ($(CPU_ARCH),alpha) | 35 | -ifeq ($(CPU_ARCH),alpha) | |
36 | - | 36 | - | |
37 | -# Ask the C compiler on alpha linux to let us work with denormalized | 37 | -# Ask the C compiler on alpha linux to let us work with denormalized | |
38 | -# double values, which are required by the ECMA spec. | 38 | -# double values, which are required by the ECMA spec. | |
39 | - | 39 | - | |
40 | -OS_CFLAGS += -mieee | 40 | -OS_CFLAGS += -mieee | |
41 | -endif | 41 | -endif | |
42 | - | 42 | - | |
43 | # Use the editline library to provide line-editing support. | 43 | # Use the editline library to provide line-editing support. | |
44 | JS_EDITLINE = 1 | 44 | JS_EDITLINE = 1 |
@@ -1,49 +1,26 @@ | @@ -1,49 +1,26 @@ | |||
1 | $NetBSD: patch-ae,v 1.3 2010/01/16 15:04:32 tnn Exp $ | 1 | $NetBSD: patch-ae,v 1.4 2010/12/23 12:36:02 fhajny Exp $ | |
2 | 2 | |||
3 | --- Makefile.ref.orig 2006-08-21 18:58:45.000000000 +0000 | 3 | --- Makefile.ref.orig 2009-02-25 13:24:29.000000000 +0000 | |
4 | +++ Makefile.ref | 4 | +++ Makefile.ref | |
5 | @@ -55,8 +55,6 @@ include config.mk | 5 | @@ -83,7 +83,7 @@ endif | |
6 | ||||
7 | ifdef USE_MSVC | |||
8 | OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib | |||
9 | -else | |||
10 | -OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm | |||
11 | endif | |||
12 | ||||
13 | ifdef JS_THREADSAFE | |||
14 | @@ -80,7 +78,8 @@ endif | |||
15 | # | |||
16 | # XCFLAGS may be set in the environment or on the gmake command line | 6 | # XCFLAGS may be set in the environment or on the gmake command line | |
17 | # | 7 | # | |
8 | #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS | |||
18 | -CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) | 9 | -CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) | |
19 | +CFLAGS += -L$(PREFIX)/lib $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) \ | 10 | +CFLAGS += -L$(PREFIX)/lib $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) | |
20 | + $(INCLUDES) $(XCFLAGS) `pkg-config --cflags nspr` | 11 | INTERP_CFLAGS += $(INTERP_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(INTERP_XCFLAGS) | |
21 | 12 | |||
22 | LDFLAGS = $(XLDFLAGS) | 13 | LDFLAGS = $(XLDFLAGS) | |
23 | 14 | @@ -318,9 +318,9 @@ ifdef USE_MSVC | ||
24 | @@ -248,12 +247,9 @@ JS_CFILES = \ | 15 | $(PROGRAM): $(PROG_OBJS) $(LIBRARY) | |
25 | prmjtime.c \ | |||
26 | $(NULL) | |||
27 | ||||
28 | -PREDIRS += fdlibm | |||
29 | ||||
30 | ifdef USE_MSVC | |||
31 | FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/fdlibm.lib | |||
32 | -else | |||
33 | -FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/libfdm.a | |||
34 | endif | |||
35 | JSMATH_PRELINK = $(OBJDIR)/jsmathtemp.o | |||
36 | # Flag for incremental linking | |||
37 | @@ -307,9 +303,9 @@ ifdef USE_MSVC | |||
38 | $(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY) | |||
39 | link.exe -out:"$@" $(EXE_LINK_FLAGS) $^ | 16 | link.exe -out:"$@" $(EXE_LINK_FLAGS) $^ | |
40 | else | 17 | else | |
41 | -$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY) | 18 | -$(PROGRAM): $(PROG_OBJS) $(LIBRARY) | |
42 | - $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \ | 19 | - $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \ | |
43 | - $(PROG_LIBS) | 20 | - $(PROG_LIBS) | |
44 | +$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) $(FDLIBM_LIBRARY) | 21 | +$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) | |
45 | + $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) $(LDFLAGS) \ | 22 | + $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) $(LDFLAGS) \ | |
46 | + $(OTHER_LIBS) $(PROG_LIBS) -ljs -lm | 23 | + $(OTHER_LIBS) $(PROG_LIBS) -ljs -lm | |
47 | endif | 24 | endif | |
48 | 25 | |||
49 | $(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY) | 26 | $(PROGRAM).pure: $(PROG_OBJS) $(LIBRARY) |
@@ -1,35 +1,35 @@ | @@ -1,35 +1,35 @@ | |||
1 | $NetBSD: patch-ai,v 1.1 2007/08/12 03:04:34 wiz Exp $ | 1 | $NetBSD: patch-ai,v 1.2 2010/12/23 12:36:02 fhajny Exp $ | |
2 | 2 | |||
3 | --- jsopcode.c.orig 2006-11-29 19:34:45.000000000 -0500 | 3 | --- jsopcode.c.orig 2009-02-03 09:25:56.000000000 +0000 | |
4 | +++ jsopcode.c | 4 | +++ jsopcode.c | |
5 | @@ -183,7 +183,7 @@ js_Disassemble1(JSContext *cx, JSScript | 5 | @@ -251,7 +251,7 @@ js_Disassemble1(JSContext *cx, JSScript | |
6 | case JOF_JUMP: | 6 | case JOF_JUMP: | |
7 | case JOF_JUMPX: | 7 | case JOF_JUMPX: | |
8 | off = GetJumpOffset(pc, pc); | 8 | off = GetJumpOffset(pc, pc); | |
9 | - fprintf(fp, " %u (%d)", loc + off, off); | 9 | - fprintf(fp, " %u (%d)", loc + off, off); | |
10 | + fprintf(fp, " %tu (%td)", loc + off, off); | 10 | + fprintf(fp, " %tu (%td)", loc + off, off); | |
11 | break; | 11 | break; | |
12 | 12 | |||
13 | case JOF_CONST: | 13 | case JOF_ATOM: | |
14 | @@ -214,10 +214,10 @@ js_Disassemble1(JSContext *cx, JSScript | 14 | @@ -298,10 +298,10 @@ js_Disassemble1(JSContext *cx, JSScript | |
15 | pc2 += JUMP_OFFSET_LEN; | 15 | pc2 += JUMP_OFFSET_LEN; | |
16 | high = GET_JUMP_OFFSET(pc2); | 16 | high = GET_JUMP_OFFSET(pc2); | |
17 | pc2 += JUMP_OFFSET_LEN; | 17 | pc2 += JUMP_OFFSET_LEN; | |
18 | - fprintf(fp, " defaultOffset %d low %d high %d", off, low, high); | 18 | - fprintf(fp, " defaultOffset %d low %d high %d", off, low, high); | |
19 | + fprintf(fp, " defaultOffset %td low %d high %d", off, low, high); | 19 | + fprintf(fp, " defaultOffset %td low %d high %d", off, low, high); | |
20 | for (i = low; i <= high; i++) { | 20 | for (i = low; i <= high; i++) { | |
21 | off = GetJumpOffset(pc, pc2); | 21 | off = GetJumpOffset(pc, pc2); | |
22 | - fprintf(fp, "\n\t%d: %d", i, off); | 22 | - fprintf(fp, "\n\t%d: %d", i, off); | |
23 | + fprintf(fp, "\n\t%d: %td", i, off); | 23 | + fprintf(fp, "\n\t%d: %td", i, off); | |
24 | pc2 += jmplen; | 24 | pc2 += jmplen; | |
25 | } | 25 | } | |
26 | len = 1 + pc2 - pc; | 26 | len = 1 + pc2 - pc; | |
27 | @@ -237,7 +237,7 @@ js_Disassemble1(JSContext *cx, JSScript | 27 | @@ -321,7 +321,7 @@ js_Disassemble1(JSContext *cx, JSScript | |
28 | pc2 += jmplen; | 28 | pc2 += jmplen; | |
29 | npairs = GET_ATOM_INDEX(pc2); | 29 | npairs = GET_UINT16(pc2); | |
30 | pc2 += ATOM_INDEX_LEN; | 30 | pc2 += UINT16_LEN; | |
31 | - fprintf(fp, " offset %d npairs %u", off, (uintN) npairs); | 31 | - fprintf(fp, " offset %d npairs %u", off, (uintN) npairs); | |
32 | + fprintf(fp, " offset %td npairs %u", off, (uintN) npairs); | 32 | + fprintf(fp, " offset %td npairs %u", off, (uintN) npairs); | |
33 | while (npairs) { | 33 | while (npairs) { | |
34 | atom = GET_ATOM(cx, script, pc2); | 34 | JS_GET_SCRIPT_ATOM(script, GET_INDEX(pc2), atom); | |
35 | pc2 += ATOM_INDEX_LEN; | 35 | pc2 += INDEX_LEN; |