diff options
author | kwm <kwm@FreeBSD.org> | 2015-01-30 18:04:27 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2015-01-30 18:04:27 +0800 |
commit | 25a913510c730ab9ce5949502a5bf58fe1af94bc (patch) | |
tree | 665bd17a22a03efe585e8788f803d72afb0d8206 /lang/spidermonkey170 | |
parent | 43b3601a5f2555c6fe449a93b67d38b82dec5ad8 (diff) | |
download | freebsd-ports-gnome-25a913510c730ab9ce5949502a5bf58fe1af94bc.tar.gz freebsd-ports-gnome-25a913510c730ab9ce5949502a5bf58fe1af94bc.tar.zst freebsd-ports-gnome-25a913510c730ab9ce5949502a5bf58fe1af94bc.zip |
Add DTRACE option
PR: 192614
Submitted by: jbeich@
Diffstat (limited to 'lang/spidermonkey170')
-rw-r--r-- | lang/spidermonkey170/Makefile | 13 | ||||
-rw-r--r-- | lang/spidermonkey170/files/patch-bug1041795 | 35 | ||||
-rw-r--r-- | lang/spidermonkey170/files/patch-bug1046224 | 32 | ||||
-rw-r--r-- | lang/spidermonkey170/files/patch-bug702179 | 23 | ||||
-rw-r--r-- | lang/spidermonkey170/pkg-plist | 2 |
5 files changed, 103 insertions, 2 deletions
diff --git a/lang/spidermonkey170/Makefile b/lang/spidermonkey170/Makefile index 800f551df08e..cf805be975e2 100644 --- a/lang/spidermonkey170/Makefile +++ b/lang/spidermonkey170/Makefile @@ -27,13 +27,17 @@ WRKSRC= ${WRKDIR}/mozjs${PORTVERSION}/js/src CONFIGURE_ARGS= --with-pthreads \ --with-system-nspr -OPTIONS_DEFINE= DEBUG GCZEAL JEMALLOC METHODJIT OPTIMIZE READLINE \ +OPTIONS_DEFINE= DEBUG DTRACE GCZEAL JEMALLOC METHODJIT OPTIMIZE READLINE \ THREADSAFE TRACEJIT UTF8 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_DESC= Build with DTrace probes # move to bsd.options.desc.mk +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 @@ -58,6 +62,13 @@ UTF8_CFLAGS= -DJS_C_STRINGS_ARE_UTF8 CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} .endif +.if ${PORT_OPTIONS:MDTRACE} +. if ${OSVERSION} < 1000510 +BROKEN= dtrace -G crashes with C++ object files +. endif +STRIP_CMD= ${TRUE} +.endif + regression-test: build @${ECHO_MSG} -n "===> Running jstests.py: " @cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \ diff --git a/lang/spidermonkey170/files/patch-bug1041795 b/lang/spidermonkey170/files/patch-bug1041795 new file mode 100644 index 000000000000..f26cab2cab6b --- /dev/null +++ b/lang/spidermonkey170/files/patch-bug1041795 @@ -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 +@@ -869,7 +869,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 +@@ -886,7 +886,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) $(LOBJS) $(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) + @$(RM) $(DTRACE_PROBE_OBJ) +diff --git js/src/Makefile.in js/src/Makefile.in +index 28ca5e8..96793d7 100644 +--- Makefile.in ++++ Makefile.in +@@ -906,7 +906,7 @@ endif + + ifdef HAVE_DTRACE + $(CURDIR)/javascript-trace.h: $(srcdir)/javascript-trace.d +- dtrace -h -s $(srcdir)/javascript-trace.d -o javascript-trace.h.in ++ dtrace -x nolibs -h -s $(srcdir)/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 diff --git a/lang/spidermonkey170/files/patch-bug1046224 b/lang/spidermonkey170/files/patch-bug1046224 new file mode 100644 index 000000000000..82279c9139c0 --- /dev/null +++ b/lang/spidermonkey170/files/patch-bug1046224 @@ -0,0 +1,32 @@ +diff --git js/src/configure js/src/configure +index 59d69c7..779a50f 100644 +--- configure ++++ configure +@@ -10204,7 +10204,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 diff --git a/lang/spidermonkey170/files/patch-bug702179 b/lang/spidermonkey170/files/patch-bug702179 new file mode 100644 index 000000000000..445ea2cb4a57 --- /dev/null +++ b/lang/spidermonkey170/files/patch-bug702179 @@ -0,0 +1,23 @@ +diff --git js/src/Makefile.in js/src/Makefile.in +index e28160a..28ca5e8 100644 +--- Makefile.in ++++ Makefile.in +@@ -57,7 +57,6 @@ ifdef JS_SHARED_LIBRARY + FORCE_SHARED_LIB = 1 + endif + FORCE_STATIC_LIB = 1 +-DIST_INSTALL = 1 + + VPATH = \ + $(srcdir) \ +@@ -857,8 +856,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 diff --git a/lang/spidermonkey170/pkg-plist b/lang/spidermonkey170/pkg-plist index 1ee56b1acc15..403cda99ee4e 100644 --- a/lang/spidermonkey170/pkg-plist +++ b/lang/spidermonkey170/pkg-plist @@ -6,6 +6,7 @@ include/js-17.0/gc/Heap.h include/js-17.0/gc/Root.h include/js-17.0/gc/Statistics.h include/js-17.0/gc/StoreBuffer.h +%%DTRACE%%include/js-17.0/javascript-trace.h include/js-17.0/js-config.h include/js-17.0/js.msg include/js-17.0/js/HashTable.h @@ -62,7 +63,6 @@ include/js-17.0/mozilla/TypeTraits.h include/js-17.0/mozilla/Types.h include/js-17.0/mozilla/Util.h include/js-17.0/mozilla/WeakPtr.h -lib/libmozjs-17.0.a lib/libmozjs-17.0.so lib/libmozjs-17.0.so.1 libdata/pkgconfig/mozjs-17.0.pc |