Index: head/lang/spidermonkey24/Makefile =================================================================== --- head/lang/spidermonkey24/Makefile (revision 378143) +++ head/lang/spidermonkey24/Makefile (revision 378144) @@ -1,77 +1,85 @@ # Created by: Kubilay Kocak # $FreeBSD$ PORTNAME= spidermonkey24 PORTVERSION= 24.2.0 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_MOZILLA} #http://people.mozilla.org/~sstangl/ MASTER_SITE_SUBDIR= js DISTNAME= mozjs-${PORTVERSION} MAINTAINER= kwm@FreeBSD.org COMMENT= Standalone JavaScript based from Mozilla 24-esr BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip LIB_DEPENDS= libnspr4.so:${PORTSDIR}/devel/nspr CONFLICTS= njs-[0-9]* GNU_CONFIGURE= yes USES= compiler:c11 gmake pathfix perl5 python:2,build \ readline tar:bzip2 USE_PERL5= build USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/mozjs-${PORTVERSION}/js/src CONFIGURE_ARGS= --with-pthreads \ --with-system-nspr OPTIONS_DEFINE= DEBUG GCZEAL JEMALLOC METHODJIT OPTIMIZE READLINE \ - THREADSAFE TRACEJIT UTF8 \ - + THREADSAFE TRACEJIT UTF8 DTRACE OPTIONS_DEFAULT= METHODJIT OPTIMIZE READLINE THREADSAFE TRACEJIT +OPTIONS_SUB= yes DEBUG_DESC= Enable Debug build DEBUG_CONFIGURE_ENABLE= debug debug-symbols DEBUG_CONFIGURE_DISABLE=debug +DTRACE_CONFIGURE_ENABLE=dtrace profiling +DTRACE_LIBS= -lelf GCZEAL_DESC= Enable Zealous garbage collecting GCZEAL_CONFIGURE_ENABLE=gczeal JEMALLOC_DESC= Use jemalloc as memory allocator JEMALLOC_CONFIGURE_ENABLE= jemalloc METHODJIT_DESC= Enable method JIT support METHODJIT_CONFIGURE_ENABLE= methodjit OPTIMIZE_DESC= Enable compiler optimizations OPTIMIZE_CONFIGURE_ENABLE= optimize READLINE_DESC= Link js shell to system readline library READLINE_CONFIGURE_ENABLE= readline THREADSAFE_DESC= Enable multiple thread support THREADSAFE_CONFIGURE_ENABLE= threadsafe TRACEJIT_DESC= Enable tracing JIT support TRACEJIT_CONFIGURE_ENABLE= tracejit UTF8_DESC= Treat strings as UTF8 instead of ISO-8859-1 UTF8_CFLAGS= -DJS_C_STRINGS_ARE_UTF8 .include .if ${ARCH} == amd64 CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} .endif +.if ${PORT_OPTIONS:MDTRACE} && ${OSVERSION} < 1000510 +BROKEN= dtrace -G crashes with C++ object files +.endif + regression-test: build @${ECHO_MSG} -n "===> Running jstests.py: " @cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \ --no-progress ./js24 .if ${PORT_OPTIONS:MMETHODJIT} || ${PORT_OPTIONS:MTRACEJIT} @${ECHO_MSG} -n "===> Running jit_test.py: " @cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} jit-test/jit_test.py \ --no-progress --jitflags=,m,j,mj,mjp,am,amj,amjp,amd ./js24 .endif post-install: ${LN} -s libmozjs-24.so ${STAGEDIR}${PREFIX}/lib/libmozjs-24.so.1 +.if ! ${PORT_OPTIONS:MDTRACE} @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/js24 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmozjs-24.* +.endif .include Index: head/lang/spidermonkey24/files/patch-assembler_jit_ExecutableAllocator.h =================================================================== --- head/lang/spidermonkey24/files/patch-assembler_jit_ExecutableAllocator.h (nonexistent) +++ head/lang/spidermonkey24/files/patch-assembler_jit_ExecutableAllocator.h (revision 378144) @@ -0,0 +1,14 @@ +--- assembler/jit/ExecutableAllocator.h.orig 2013-10-29 20:40:26 UTC ++++ assembler/jit/ExecutableAllocator.h +@@ -477,6 +477,11 @@ public: + { + sync_instruction_memory((caddr_t)code, size); + } ++#elif CPU(ARM_TRADITIONAL) && OS(FREEBSD) && COMPILER(CLANG) ++ static void cacheFlush(void* code, size_t size) ++ { ++ __clear_cache(code, reinterpret_cast(code) + size); ++ } + #endif + + private: Property changes on: head/lang/spidermonkey24/files/patch-assembler_jit_ExecutableAllocator.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/files/patch-bug1041795 =================================================================== --- head/lang/spidermonkey24/files/patch-bug1041795 (nonexistent) +++ head/lang/spidermonkey24/files/patch-bug1041795 (revision 378144) @@ -0,0 +1,35 @@ +diff --git js/src/config/rules.mk js/src/config/rules.mk +index 4d67eda..783942f 100644 +--- config/rules.mk ++++ config/rules.mk +@@ -858,7 +858,7 @@ ifdef DTRACE_PROBE_OBJ + ifndef DTRACE_LIB_DEPENDENT + NON_DTRACE_OBJS := $(filter-out $(DTRACE_PROBE_OBJ),$(OBJS)) + $(DTRACE_PROBE_OBJ): $(NON_DTRACE_OBJS) +- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS) ++ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS) + endif + endif + endif +@@ -876,7 +876,7 @@ ifndef INCREMENTAL_LINKER + endif + ifdef DTRACE_LIB_DEPENDENT + ifndef XP_MACOSX +- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) ++ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) + endif + $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS)) + @$(RM) $(DTRACE_PROBE_OBJ) +diff --git js/src/Makefile.in js/src/Makefile.in +index 28ca5e8..96793d7 100644 +--- Makefile.in ++++ Makefile.in +@@ -342,7 +342,7 @@ endif + + ifdef HAVE_DTRACE + $(CURDIR)/javascript-trace.h: $(srcdir)/devtools/javascript-trace.d +- dtrace -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in ++ dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in + sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \ + -e '/const/!s/char \*/const char */g' \ + javascript-trace.h.in > javascript-trace.h Property changes on: head/lang/spidermonkey24/files/patch-bug1041795 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/files/patch-bug1046224 =================================================================== --- head/lang/spidermonkey24/files/patch-bug1046224 (nonexistent) +++ head/lang/spidermonkey24/files/patch-bug1046224 (revision 378144) @@ -0,0 +1,32 @@ +diff --git js/src/configure js/src/configure +index 59d69c7..779a50f 100644 +--- configure ++++ configure +@@ -10260,7 +10260,13 @@ cross_compiling=$ac_cv_prog_cc_cross + # Check whether --enable-dtrace or --disable-dtrace was given. + if test "${enable_dtrace+set}" = set; then + enableval="$enable_dtrace" +- enable_dtrace="yes" ++ if test "$enableval" = "yes"; then ++ enable_dtrace="yes" ++ elif test "$enableval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; exit 1; } ++ fi + fi + + if test "x$enable_dtrace" = "xyes"; then +diff --git js/src/configure.in js/src/configure.in +index 59d69c7..779a50f 100644 +--- configure.in ++++ configure.in +@@ -2153,7 +2153,7 @@ dnl Quota support + MOZ_CHECK_HEADERS(sys/quota.h) + MOZ_CHECK_HEADERS(linux/quota.h) + +-AC_ARG_ENABLE(dtrace, ++MOZ_ARG_ENABLE_BOOL(dtrace, + [ --enable-dtrace build with dtrace support if available (default=no)], + [enable_dtrace="yes"],) + if test "x$enable_dtrace" = "xyes"; then Property changes on: head/lang/spidermonkey24/files/patch-bug1046224 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/files/patch-bug702179 =================================================================== --- head/lang/spidermonkey24/files/patch-bug702179 (nonexistent) +++ head/lang/spidermonkey24/files/patch-bug702179 (revision 378144) @@ -0,0 +1,23 @@ +diff --git js/src/Makefile.in js/src/Makefile.in +index e28160a..28ca5e8 100644 +--- Makefile.in ++++ Makefile.in +@@ -35,7 +35,6 @@ ifdef JS_SHARED_LIBRARY + FORCE_SHARED_LIB = 1 + endif + FORCE_STATIC_LIB = 1 +-DIST_INSTALL = 1 + + ############################################### + # BEGIN include sources for low-level code shared with mfbt +@@ -584,8 +584,8 @@ install:: $(EXPORTS_mozilla) + install:: $(SCRIPTS) + $(SYSINSTALL) $^ $(DESTDIR)$(bindir) + +-install:: $(REAL_LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) +-ifneq (,$(REAL_LIBRARY)) ++install:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) ++ifdef DIST_INSTALL + $(SYSINSTALL) $(REAL_LIBRARY) $(DESTDIR)$(libdir) + mv -f $(DESTDIR)$(libdir)/$(REAL_LIBRARY) $(subst $(STATIC_LIBRARY_NAME),$(LIBRARY_NAME),$(DESTDIR)$(libdir)/$(REAL_LIBRARY)) + endif Property changes on: head/lang/spidermonkey24/files/patch-bug702179 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/files/patch-jit_AsmJSSignalHandlers.cpp =================================================================== --- head/lang/spidermonkey24/files/patch-jit_AsmJSSignalHandlers.cpp (nonexistent) +++ head/lang/spidermonkey24/files/patch-jit_AsmJSSignalHandlers.cpp (revision 378144) @@ -0,0 +1,67 @@ +https://hg.mozilla.org/mozilla-central/rev/07ce4364fbec + +--- jit/AsmJSSignalHandlers.cpp.orig 2013-10-29 21:40:19.000000000 +0100 ++++ jit/AsmJSSignalHandlers.cpp 2015-01-25 11:23:43.104097667 +0100 +@@ -64,7 +64,6 @@ + # endif + # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP]) + # define RIP_sig(p) ((p)->uc_mcontext.gregs[REG_RIP]) +-# define PC_sig(p) ((p)->uc_mcontext.arm_pc) + # define RAX_sig(p) ((p)->uc_mcontext.gregs[REG_RAX]) + # define RCX_sig(p) ((p)->uc_mcontext.gregs[REG_RCX]) + # define RDX_sig(p) ((p)->uc_mcontext.gregs[REG_RDX]) +@@ -80,7 +79,11 @@ + # define R12_sig(p) ((p)->uc_mcontext.gregs[REG_R12]) + # define R13_sig(p) ((p)->uc_mcontext.gregs[REG_R13]) + # define R14_sig(p) ((p)->uc_mcontext.gregs[REG_R14]) +-# define R15_sig(p) ((p)->uc_mcontext.gregs[REG_R15]) ++# if defined(__linux__) && defined(__arm__) ++# define R15_sig(p) ((p)->uc_mcontext.arm_pc) ++# else ++# define R15_sig(p) ((p)->uc_mcontext.gregs[REG_R15]) ++# endif + #elif defined(__NetBSD__) + # define XMM_sig(p,i) (((struct fxsave64 *)(p)->uc_mcontext.__fpregs)->fx_xmm[i]) + # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP]) +@@ -124,7 +127,11 @@ + # define R12_sig(p) ((p)->uc_mcontext.mc_r12) + # define R13_sig(p) ((p)->uc_mcontext.mc_r13) + # define R14_sig(p) ((p)->uc_mcontext.mc_r14) +-# define R15_sig(p) ((p)->uc_mcontext.mc_r15) ++# if defined(__FreeBSD__) && defined(__arm__) ++# define R15_sig(p) ((p)->uc_mcontext.__gregs[_REG_R15]) ++# else ++# define R15_sig(p) ((p)->uc_mcontext.mc_r15) ++# endif + #elif defined(XP_MACOSX) + // Mach requires special treatment. + #else +@@ -325,20 +332,20 @@ + # define CONTEXT ucontext_t + # endif + ++#if defined(JS_CPU_X64) ++# define PC_sig(p) RIP_sig(p) ++#elif defined(JS_CPU_X86) ++# define PC_sig(p) EIP_sig(p) ++#elif defined(JS_CPU_ARM) ++# define PC_sig(p) R15_sig(p) ++#endif ++ + # if !defined(XP_MACOSX) + static uint8_t ** + ContextToPC(CONTEXT *context) + { +-# if defined(JS_CPU_X64) +- JS_STATIC_ASSERT(sizeof(RIP_sig(context)) == sizeof(void*)); +- return reinterpret_cast(&RIP_sig(context)); +-# elif defined(JS_CPU_X86) +- JS_STATIC_ASSERT(sizeof(EIP_sig(context)) == sizeof(void*)); +- return reinterpret_cast(&EIP_sig(context)); +-# elif defined(JS_CPU_ARM) + JS_STATIC_ASSERT(sizeof(PC_sig(context)) == sizeof(void*)); + return reinterpret_cast(&PC_sig(context)); +-# endif + } + + # if defined(JS_CPU_X64) Property changes on: head/lang/spidermonkey24/files/patch-jit_AsmJSSignalHandlers.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/files/patch-jit_arm_Architecture-arm.cpp =================================================================== --- head/lang/spidermonkey24/files/patch-jit_arm_Architecture-arm.cpp (nonexistent) +++ head/lang/spidermonkey24/files/patch-jit_arm_Architecture-arm.cpp (revision 378144) @@ -0,0 +1,11 @@ +--- jit/arm/Architecture-arm.cpp.orig 2013-10-29 20:40:20 UTC ++++ jit/arm/Architecture-arm.cpp +@@ -15,7 +15,7 @@ + + // lame check for kernel version + // see bug 586550 +-#if !(defined(ANDROID) || defined(MOZ_B2G)) ++#if !(defined(ANDROID) || defined(MOZ_B2G) || defined(__FreeBSD__)) + #include + #else + #define HWCAP_VFP (1<<0) Property changes on: head/lang/spidermonkey24/files/patch-jit_arm_Architecture-arm.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/spidermonkey24/pkg-plist =================================================================== --- head/lang/spidermonkey24/pkg-plist (revision 378143) +++ head/lang/spidermonkey24/pkg-plist (revision 378144) @@ -1,78 +1,80 @@ bin/js24 bin/js24-config +%%DTRACE%%include/mozjs-24/javascript-trace.h include/mozjs-24/js-config.h include/mozjs-24/js.msg include/mozjs-24/js/Anchor.h include/mozjs-24/js/CallArgs.h include/mozjs-24/js/CharacterEncoding.h include/mozjs-24/js/Date.h include/mozjs-24/js/GCAPI.h include/mozjs-24/js/HashTable.h include/mozjs-24/js/HeapAPI.h include/mozjs-24/js/LegacyIntTypes.h include/mozjs-24/js/MemoryMetrics.h include/mozjs-24/js/PropertyKey.h include/mozjs-24/js/RequiredDefines.h include/mozjs-24/js/RootingAPI.h include/mozjs-24/js/TemplateLib.h include/mozjs-24/js/Utility.h include/mozjs-24/js/Value.h include/mozjs-24/js/Vector.h include/mozjs-24/jsalloc.h include/mozjs-24/jsapi.h include/mozjs-24/jsclass.h include/mozjs-24/jsclist.h include/mozjs-24/jscpucfg.h include/mozjs-24/jsdbgapi.h include/mozjs-24/jsfriendapi.h include/mozjs-24/jslock.h include/mozjs-24/jsperf.h include/mozjs-24/jsprf.h include/mozjs-24/jsprototypes.h include/mozjs-24/jsproxy.h include/mozjs-24/jsprvtd.h include/mozjs-24/jspubtd.h include/mozjs-24/jstypes.h include/mozjs-24/jsutil.h include/mozjs-24/jsversion.h include/mozjs-24/jswrapper.h include/mozjs-24/mozilla/Assertions.h include/mozjs-24/mozilla/Atomics.h include/mozjs-24/mozilla/Attributes.h include/mozjs-24/mozilla/BloomFilter.h include/mozjs-24/mozilla/Casting.h include/mozjs-24/mozilla/Char16.h include/mozjs-24/mozilla/CheckedInt.h include/mozjs-24/mozilla/Compiler.h include/mozjs-24/mozilla/Constants.h include/mozjs-24/mozilla/DebugOnly.h include/mozjs-24/mozilla/Decimal.h include/mozjs-24/mozilla/Endian.h include/mozjs-24/mozilla/EnumSet.h include/mozjs-24/mozilla/FloatingPoint.h include/mozjs-24/mozilla/GuardObjects.h include/mozjs-24/mozilla/HashFunctions.h include/mozjs-24/mozilla/Likely.h include/mozjs-24/mozilla/LinkedList.h include/mozjs-24/mozilla/MSStdInt.h include/mozjs-24/mozilla/MathAlgorithms.h include/mozjs-24/mozilla/MemoryChecking.h include/mozjs-24/mozilla/NullPtr.h include/mozjs-24/mozilla/PodOperations.h include/mozjs-24/mozilla/Poison.h include/mozjs-24/mozilla/Range.h include/mozjs-24/mozilla/RangedPtr.h include/mozjs-24/mozilla/RefPtr.h include/mozjs-24/mozilla/SHA1.h include/mozjs-24/mozilla/Scoped.h include/mozjs-24/mozilla/SplayTree.h include/mozjs-24/mozilla/StandardInteger.h include/mozjs-24/mozilla/ThreadLocal.h include/mozjs-24/mozilla/TypeTraits.h include/mozjs-24/mozilla/TypedEnum.h include/mozjs-24/mozilla/Types.h include/mozjs-24/mozilla/Util.h include/mozjs-24/mozilla/WeakPtr.h +@comment lib/libmozjs-24.a lib/libmozjs-24.so lib/libmozjs-24.so.1 libdata/pkgconfig/mozjs-24.pc