[arch-commits] Commit in js52/trunk (12 files)
Jan Steffens
heftig at archlinux.org
Thu Sep 14 21:34:41 UTC 2017
Date: Thursday, September 14, 2017 @ 21:34:40
Author: heftig
Revision: 305575
52.3.0-1
Added:
js52/trunk/mozjs52-copy-headers.patch
(from rev 305574, js52/trunk/mozjs38-copy-headers.patch)
js52/trunk/mozjs52-disable-mozglue.patch
js52/trunk/mozjs52-fix-soname.patch
js52/trunk/mozjs52-include-configure-script.patch
Modified:
js52/trunk/PKGBUILD (contents, properties)
Deleted:
js52/trunk/mozjs38-1269317.patch
js52/trunk/mozjs38-add-bracket.patch
js52/trunk/mozjs38-copy-headers.patch
js52/trunk/mozjs38-fix-tracelogger.patch
js52/trunk/mozjs38-install-name.patch
js52/trunk/mozjs38-pkg-config-version.patch
js52/trunk/mozjs38-shell-version.patch
----------------------------------------+
PKGBUILD | 98 ++---
mozjs38-1269317.patch | 122 ------
mozjs38-add-bracket.patch | 16
mozjs38-copy-headers.patch | 20 -
mozjs38-fix-tracelogger.patch | 603 -------------------------------
mozjs38-install-name.patch | 11
mozjs38-pkg-config-version.patch | 22 -
mozjs38-shell-version.patch | 65 ---
mozjs52-copy-headers.patch | 30 +
mozjs52-disable-mozglue.patch | 66 +++
mozjs52-fix-soname.patch | 34 +
mozjs52-include-configure-script.patch | 63 +++
12 files changed, 245 insertions(+), 905 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-09-14 21:17:42 UTC (rev 305574)
+++ PKGBUILD 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,69 +1,75 @@
-# $Id: PKGBUILD 280035 2016-11-07 16:57:54Z foutrelis $
-# Maintainer: Ionut Biru <ibiru at archlinux.org>
+# $Id$
+# Contributor: Ionut Biru <ibiru at archlinux.org>
-pkgname=js38
-pkgver=38.8.0
-pkgrel=3
-pkgdesc="JavaScript interpreter and libraries - Version 38"
+pkgname=js52
+pkgver=52.3.0
+pkgrel=1
+_ffver=${pkgver%%.*}
+pkgdesc="JavaScript interpreter and libraries - Version $_ffver"
arch=(i686 x86_64)
-url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/38"
+url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
license=(MPL)
depends=(nspr gcc-libs readline zlib icu libffi)
-makedepends=(python2 libffi zip)
-options=(!staticlibs)
-source=(https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.bz2
- mozjs38-fix-tracelogger.patch
- mozjs38-shell-version.patch
- mozjs38-pkg-config-version.patch
- mozjs38-install-name.patch
- mozjs38-copy-headers.patch
- mozjs38-add-bracket.patch
- mozjs38-1269317.patch)
-sha256sums=('9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982'
- '55e656c41583cd4e5468cb4b93c0f57f40f2817adcc1acf9333b4b248969983d'
- '16b00caf68c23d7b484b42b523ca49465853fee5161b34520cb93fc89bf16903'
- 'fcdc86524d3abb89244310bded9e994833b1ecad2cb181821cbb523e2c1b567a'
- '56d1336f0bfa9b1d1a19313f3cdece317bf6a169c7369ecdc068e7ab99d16d9e'
- 'd052a19e7d33023e927c83fda5dcf7a90127934df034969011960b3b8e6930ed'
- '3d3a53949da5d1da201548d9de41c99c1ff6d52e1ac7bc047e2c96e6c5f9e3a7'
- 'e34338b3bfb1a16c3f98b73007b914560085d54ba94d56cb1b8586330cbef506')
+makedepends=(python2 zip autoconf2.13 mercurial)
+_repo=https://hg.mozilla.org/mozilla-unified
+source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}esr_RELEASE"
+ mozjs52-copy-headers.patch
+ mozjs52-disable-mozglue.patch
+ mozjs52-fix-soname.patch
+ mozjs52-include-configure-script.patch)
+sha256sums=('SKIP'
+ 'c5b3a88e4d10ef149aba6fc48d431db54ff266323fa22a5d549028fd794423cc'
+ '5a84f02521f37de873991dd360a4c4bfdbdd2fb4a218e11be73f9cbbf02050e8'
+ '06389b8e30465bb8e6fab6144dadedffa30595f143a686524da175b5cf5e8a27'
+ 'd91a89acd88bfc747a255050757a0c17139bf5c3508c2e1c3c6bb2056786a344')
prepare() {
- cd mozilla-esr38
+ cd mozilla-unified
- patch -Np1 -i ../mozjs38-fix-tracelogger.patch
- patch -Np1 -i ../mozjs38-shell-version.patch
- patch -Np1 -i ../mozjs38-pkg-config-version.patch
- patch -Np1 -i ../mozjs38-install-name.patch
- patch -Np1 -i ../mozjs38-copy-headers.patch
- patch -Np1 -i ../mozjs38-add-bracket.patch
- patch -Np1 -i ../mozjs38-1269317.patch
+ # https://anonscm.debian.org/git/pkg-gnome/mozjs52.git/tree/debian/patches
+ patch -Np1 -i ../mozjs52-fix-soname.patch
+ patch -Np1 -i ../mozjs52-copy-headers.patch
+ patch -Np1 -i ../mozjs52-disable-mozglue.patch
+ patch -Np1 -i ../mozjs52-include-configure-script.patch
}
build() {
unset CPPFLAGS
- CXXFLAGS+=' -fno-delete-null-pointer-checks -fpermissive -fno-tree-vrp -fno-strict-aliasing'
- CFLAGS+=' -fno-delete-null-pointer-checks -fpermissive -fno-tree-vrp -fno-strict-aliasing'
+ CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-schedule-insns2 -fno-lifetime-dse'
+ CFLAGS+=' -fno-delete-null-pointer-checks -fno-schedule-insns2 -fno-lifetime-dse'
export PYTHON=/usr/bin/python2
- cd mozilla-esr38/js/src
- ./configure --prefix=/usr --with-system-nspr --enable-system-ffi \
- --with-system-zlib --with-system-icu --with-intl-api --enable-ctypes \
- --enable-threadsafe --enable-system-ffi --enable-shared-js --enable-gcgenerational --disable-optimize --enable-pie
+
+ cd mozilla-unified/js/src
+ sh configure \
+ --prefix=/usr \
+ --disable-optimize \
+ --enable-ctypes \
+ --enable-gcgenerational \
+ --enable-pie \
+ --enable-readline \
+ --enable-shared-js \
+ --enable-system-ffi \
+ --enable-tests \
+ --enable-threadsafe \
+ --enable-xterm-updates \
+ --with-intl-api \
+ --with-system-icu \
+ --with-system-nspr \
+ --with-system-zlib
make
}
check() {
- cd mozilla-esr38/js/src
- # Disabled: test suite fails because it is broken.
- #make -j1 check
+ cd mozilla-unified/js/src
+ # Intl/Date/toLocaleDateString_timeZone.js:39:5 Error: Assertion failed: got "12/6/2012, UTC", expected "12/6/2012, GMT"
+ #make check-jstests
}
package() {
- cd mozilla-esr38/js/src
+ cd mozilla-unified/js/src
make DESTDIR="$pkgdir" install
- rm -f "$pkgdir"/usr/lib/*.ajs
- rm -f "$pkgdir"/usr/bin/js38
- find "$pkgdir"/usr/{lib/pkgconfig,include} -type f -exec chmod -x {} +
+ rm "$pkgdir"/usr/lib/*.ajs
+ find "$pkgdir"/usr/{lib/pkgconfig,include} -type f -exec chmod -c a-x {} +
}
# vim:set ts=2 sw=2 et:
Property changes on: js52/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Deleted: mozjs38-1269317.patch
===================================================================
--- mozjs38-1269317.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-1269317.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,122 +0,0 @@
---- a/js/src/jit/RegisterSets.h 2017-02-10 17:33:06.210702431 -0800
-+++ b/js/src/jit/RegisterSets.h 2017-02-10 17:43:52.877514146 -0800
-@@ -7,7 +7,6 @@
- #ifndef jit_RegisterSets_h
- #define jit_RegisterSets_h
-
--#include "mozilla/Alignment.h"
- #include "mozilla/MathAlgorithms.h"
-
- #include "jit/JitAllocPolicy.h"
-@@ -26,8 +25,8 @@
- Code code_;
-
- public:
-- AnyRegister()
-- { }
-+ AnyRegister() = default;
-+
- explicit AnyRegister(Register gpr) {
- code_ = gpr.code();
- }
-@@ -156,7 +155,7 @@
- }
- #endif
-
-- ValueOperand() {}
-+ ValueOperand() = default;
- };
-
- // Registers to hold either either a typed or untyped value.
-@@ -165,46 +164,25 @@
- // Type of value being stored.
- MIRType type_;
-
-- // Space to hold either an AnyRegister or a ValueOperand.
- union U {
-- mozilla::AlignedStorage2<AnyRegister> typed;
-- mozilla::AlignedStorage2<ValueOperand> value;
-+ AnyRegister typed;
-+ ValueOperand value;
- } data;
-
-- AnyRegister& dataTyped() {
-- MOZ_ASSERT(hasTyped());
-- return *data.typed.addr();
-- }
-- ValueOperand& dataValue() {
-- MOZ_ASSERT(hasValue());
-- return *data.value.addr();
-- }
--
-- AnyRegister dataTyped() const {
-- MOZ_ASSERT(hasTyped());
-- return *data.typed.addr();
-- }
-- const ValueOperand& dataValue() const {
-- MOZ_ASSERT(hasValue());
-- return *data.value.addr();
-- }
--
- public:
-
-- TypedOrValueRegister()
-- : type_(MIRType_None)
-- {}
-+ TypedOrValueRegister() = default;
-
- TypedOrValueRegister(MIRType type, AnyRegister reg)
- : type_(type)
- {
-- dataTyped() = reg;
-+ data.typed = reg;
- }
-
- MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
- : type_(MIRType_Value)
- {
-- dataValue() = value;
-+ data.value = value;
- }
-
- MIRType type() const {
-@@ -220,11 +198,13 @@
- }
-
- AnyRegister typedReg() const {
-- return dataTyped();
-+ MOZ_ASSERT(hasTyped());
-+ return data.typed;
- }
-
- ValueOperand valueReg() const {
-- return dataValue();
-+ MOZ_ASSERT(hasValue());
-+ return data.value;
- }
-
- AnyRegister scratchReg() {
-@@ -240,19 +220,18 @@
- // Whether a constant value is being stored.
- bool constant_;
-
-- // Space to hold either a Value or a TypedOrValueRegister.
- union U {
-- mozilla::AlignedStorage2<Value> constant;
-- mozilla::AlignedStorage2<TypedOrValueRegister> reg;
-+ Value constant;
-+ TypedOrValueRegister reg;
- } data;
-
- Value& dataValue() {
- MOZ_ASSERT(constant());
-- return *data.constant.addr();
-+ return data.constant;
- }
- TypedOrValueRegister& dataReg() {
- MOZ_ASSERT(!constant());
-- return *data.reg.addr();
-+ return data.reg;
- }
-
- public:
Deleted: mozjs38-add-bracket.patch
===================================================================
--- mozjs38-add-bracket.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-add-bracket.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,16 +0,0 @@
-Add bracket for sed 4.3 compliance
-
-Based on upstream fix by Daniel Stenberg in 09 jan 2017
-See: https://hg.mozilla.org/mozilla-central/rev/ebcbf47a83e7
-
---- a/js/src/configure 2017-02-21 16:56:42.350105741 -0300
-+++ b/js/src/configure 2017-02-21 17:33:13.183493978 -0300
-@@ -15231,7 +15231,7 @@
- fi
- fi
-
-- version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
-+ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
- if test x"$version" = x; then
- { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
- fi
Deleted: mozjs38-copy-headers.patch
===================================================================
--- mozjs38-copy-headers.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-copy-headers.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,20 +0,0 @@
-Description: Copy headers on install instead of symlinking
-Author: Rico Tzschichholz <ricotz at ubuntu.com>
-Forwarded: no
-Last-Update: 2014-10-29
-
----
-
-Index: b/python/mozbuild/mozbuild/backend/recursivemake.py
-===================================================================
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -796,7 +796,7 @@
- return
-
- for source, dest, _ in self._walk_hierarchy(obj, exports):
-- self._install_manifests['dist_include'].add_symlink(source, dest)
-+ self._install_manifests['dist_include'].add_copy(source, dest)
-
- if not os.path.exists(source):
- raise Exception('File listed in EXPORTS does not exist: %s' % source)
Deleted: mozjs38-fix-tracelogger.patch
===================================================================
--- mozjs38-fix-tracelogger.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-fix-tracelogger.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,603 +0,0 @@
-# === Fix the SM38 tracelogger ===
-# This patch is a squashed version of several patches that were adapted
-# to fix failing hunks.
-#
-# Applied in the following order, they are:
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223767
-# Assertion failure: i < size_, at js/src/vm/TraceLoggingTypes.h:210
-# Also fix stop-information to make reduce.py work correctly.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227914
-# Limit the memory tracelogger can take.
-# This causes tracelogger to flush data to the disk regularly and prevents out of
-# memory issues if a lot of data gets logged.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1155618
-# Fix tracelogger destructor that touches possibly uninitialised hash table.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223636
-# Don't treat extraTextId as containing only extra ids.
-# This fixes an assertion failure: id == nextTextId at js/src/vm/TraceLoggingGraph.cpp
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227028
-# Fix when to keep the payload of a TraceLogger event.
-# This fixes an assertion failure: textId < uint32_t(1 << 31) at js/src/vm/TraceLoggingGraph.h
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1266649
-# Handle failing to add to pointermap gracefully.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1280648
-# Don't cache based on pointers to movable GC things.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1224123
-# Fix the use of LastEntryId in tracelogger.h.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1231170
-# Use size in debugger instead of the current id to track last logged item.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1221844
-# Move TraceLogger_Invalidation to LOG_ITEM.
-# Add some debug checks to logTimestamp.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1255766
-# Also mark resizing of memory.
-# * https://bugzilla.mozilla.org/show_bug.cgi?id=1259403
-# Only increase capacity by multiples of 2.
-# Always make sure there are 3 free slots for events.
-# ===
-
-diff --git a/js/src/jit-test/tests/tracelogger/bug1231170.js b/js/src/jit-test/tests/tracelogger/bug1231170.js
-new file mode 100644
-index 0000000..023e93e
---- /dev/null
-+++ b/js/src/jit-test/tests/tracelogger/bug1231170.js
-@@ -0,0 +1,3 @@
-+var du = new Debugger();
-+if (typeof du.drainTraceLogger === "function")
-+ du.drainTraceLogger();
-diff --git a/js/src/jit-test/tests/tracelogger/bug1266649.js b/js/src/jit-test/tests/tracelogger/bug1266649.js
-new file mode 100644
-index 0000000..81ae7ad
---- /dev/null
-+++ b/js/src/jit-test/tests/tracelogger/bug1266649.js
-@@ -0,0 +1,10 @@
-+
-+var du = new Debugger();
-+if (typeof du.setupTraceLogger === "function" &&
-+ typeof oomTest === 'function')
-+{
-+ du.setupTraceLogger({
-+ Scripts: true
-+ })
-+ oomTest(() => function(){});
-+}
-diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
-index 93e2fda..09049d6 100644
---- a/js/src/jit/Ion.cpp
-+++ b/js/src/jit/Ion.cpp
-@@ -1055,6 +1055,8 @@ IonScript::Destroy(FreeOp* fop, IonScript* script)
-
- script->destroyCaches();
- script->unlinkFromRuntime(fop);
-+ // Frees the potential event we have set.
-+ script->traceLoggerScriptEvent_ = TraceLoggerEvent();
- fop->free_(script);
- }
-
-diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
-index 26262fd..af7f313 100644
---- a/js/src/vm/Debugger.cpp
-+++ b/js/src/vm/Debugger.cpp
-@@ -369,10 +369,10 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
- objects(cx),
- environments(cx),
- #ifdef NIGHTLY_BUILD
-- traceLoggerLastDrainedId(0),
-+ traceLoggerLastDrainedSize(0),
- traceLoggerLastDrainedIteration(0),
- #endif
-- traceLoggerScriptedCallsLastDrainedId(0),
-+ traceLoggerScriptedCallsLastDrainedSize(0),
- traceLoggerScriptedCallsLastDrainedIteration(0)
- {
- assertSameCompartment(cx, dbg);
-@@ -3907,9 +3907,9 @@ Debugger::drainTraceLogger(JSContext* cx, unsigned argc, Value* vp)
- size_t num;
- TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime());
- bool lostEvents = logger->lostEvents(dbg->traceLoggerLastDrainedIteration,
-- dbg->traceLoggerLastDrainedId);
-+ dbg->traceLoggerLastDrainedSize);
- EventEntry* events = logger->getEventsStartingAt(&dbg->traceLoggerLastDrainedIteration,
-- &dbg->traceLoggerLastDrainedId,
-+ &dbg->traceLoggerLastDrainedSize,
- &num);
-
- RootedObject array(cx, NewDenseEmptyArray(cx));
-@@ -4002,10 +4002,10 @@ Debugger::drainTraceLoggerScriptCalls(JSContext* cx, unsigned argc, Value* vp)
- size_t num;
- TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime());
- bool lostEvents = logger->lostEvents(dbg->traceLoggerScriptedCallsLastDrainedIteration,
-- dbg->traceLoggerScriptedCallsLastDrainedId);
-+ dbg->traceLoggerScriptedCallsLastDrainedSize);
- EventEntry* events = logger->getEventsStartingAt(
- &dbg->traceLoggerScriptedCallsLastDrainedIteration,
-- &dbg->traceLoggerScriptedCallsLastDrainedId,
-+ &dbg->traceLoggerScriptedCallsLastDrainedSize,
- &num);
-
- RootedObject array(cx, NewDenseEmptyArray(cx));
-diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
-index 8cac36a..c92d685 100644
---- a/js/src/vm/Debugger.h
-+++ b/js/src/vm/Debugger.h
-@@ -314,10 +314,10 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
- * lost events.
- */
- #ifdef NIGHTLY_BUILD
-- uint32_t traceLoggerLastDrainedId;
-+ uint32_t traceLoggerLastDrainedSize;
- uint32_t traceLoggerLastDrainedIteration;
- #endif
-- uint32_t traceLoggerScriptedCallsLastDrainedId;
-+ uint32_t traceLoggerScriptedCallsLastDrainedSize;
- uint32_t traceLoggerScriptedCallsLastDrainedIteration;
-
- class FrameRange;
-diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp
-index 6715b36..9766a6f 100644
---- a/js/src/vm/TraceLogging.cpp
-+++ b/js/src/vm/TraceLogging.cpp
-@@ -131,7 +131,7 @@ TraceLoggerThread::init()
- {
- if (!pointerMap.init())
- return false;
-- if (!extraTextId.init())
-+ if (!textIdPayloads.init())
- return false;
- if (!events.init())
- return false;
-@@ -185,10 +185,10 @@ TraceLoggerThread::~TraceLoggerThread()
- graph = nullptr;
- }
-
-- for (TextIdHashMap::Range r = extraTextId.all(); !r.empty(); r.popFront())
-- js_delete(r.front().value());
-- extraTextId.finish();
-- pointerMap.finish();
-+ if (textIdPayloads.initialized()) {
-+ for (TextIdHashMap::Range r = textIdPayloads.all(); !r.empty(); r.popFront())
-+ js_delete(r.front().value());
-+ }
- }
-
- bool
-@@ -287,7 +287,7 @@ TraceLoggerThread::eventText(uint32_t id)
- if (id < TraceLogger_Last)
- return TLTextIdString(static_cast<TraceLoggerTextId>(id));
-
-- TextIdHashMap::Ptr p = extraTextId.lookup(id);
-+ TextIdHashMap::Ptr p = textIdPayloads.lookup(id);
- MOZ_ASSERT(p);
-
- return p->value()->string();
-@@ -341,13 +341,15 @@ TraceLoggerThread::extractScriptDetails(uint32_t textId, const char** filename,
- TraceLoggerEventPayload*
- TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId textId)
- {
-- TextIdHashMap::AddPtr p = extraTextId.lookupForAdd(textId);
-- if (p)
-+ TextIdHashMap::AddPtr p = textIdPayloads.lookupForAdd(textId);
-+ if (p) {
-+ MOZ_ASSERT(p->value()->textId() == textId); // Sanity check.
- return p->value();
-+ }
-
- TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, (char*)nullptr);
-
-- if (!extraTextId.add(p, textId, payload))
-+ if (!textIdPayloads.add(p, textId, payload))
- return nullptr;
-
- return payload;
-@@ -357,8 +359,10 @@ TraceLoggerEventPayload*
- TraceLoggerThread::getOrCreateEventPayload(const char* text)
- {
- PointerHashMap::AddPtr p = pointerMap.lookupForAdd((const void*)text);
-- if (p)
-+ if (p) {
-+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check.
- return p->value();
-+ }
-
- size_t len = strlen(text);
- char* str = js_pod_malloc<char>(len + 1);
-@@ -369,7 +373,7 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text)
- MOZ_ASSERT(ret == len);
- MOZ_ASSERT(strlen(str) == len);
-
-- uint32_t textId = extraTextId.count() + TraceLogger_Last;
-+ uint32_t textId = nextTextId;
-
- TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, str);
- if (!payload) {
-@@ -377,17 +381,19 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text)
- return nullptr;
- }
-
-- if (!extraTextId.putNew(textId, payload)) {
-+ if (!textIdPayloads.putNew(textId, payload)) {
- js_delete(payload);
- return nullptr;
- }
-
-- if (!pointerMap.add(p, text, payload))
-- return nullptr;
--
- if (graph.get())
- graph->addTextId(textId, str);
-
-+ nextTextId++;
-+
-+ if (!pointerMap.add(p, text, payload))
-+ return nullptr;
-+
- return payload;
- }
-
-@@ -407,9 +413,14 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f
- if (!traceLoggerState->isTextIdEnabled(type))
- return getOrCreateEventPayload(type);
-
-- PointerHashMap::AddPtr p = pointerMap.lookupForAdd(ptr);
-- if (p)
-- return p->value();
-+ PointerHashMap::AddPtr p;
-+ if (ptr) {
-+ p = pointerMap.lookupForAdd(ptr);
-+ if (p) {
-+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check.
-+ return p->value();
-+ }
-+ }
-
- // Compute the length of the string to create.
- size_t lenFilename = strlen(filename);
-@@ -428,24 +439,28 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f
- MOZ_ASSERT(ret == len);
- MOZ_ASSERT(strlen(str) == len);
-
-- uint32_t textId = extraTextId.count() + TraceLogger_Last;
-+ uint32_t textId = nextTextId;
- TraceLoggerEventPayload* payload = js_new<TraceLoggerEventPayload>(textId, str);
- if (!payload) {
- js_free(str);
- return nullptr;
- }
-
-- if (!extraTextId.putNew(textId, payload)) {
-+ if (!textIdPayloads.putNew(textId, payload)) {
- js_delete(payload);
- return nullptr;
- }
-
-- if (!pointerMap.add(p, ptr, payload))
-- return nullptr;
--
- if (graph.get())
- graph->addTextId(textId, str);
-
-+ nextTextId++;
-+
-+ if (ptr) {
-+ if (!pointerMap.add(p, ptr, payload))
-+ return nullptr;
-+ }
-+
- return payload;
- }
-
-@@ -453,14 +468,14 @@ TraceLoggerEventPayload*
- TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, JSScript* script)
- {
- return getOrCreateEventPayload(type, script->filename(), script->lineno(), script->column(),
-- script);
-+ nullptr);
- }
-
- TraceLoggerEventPayload*
- TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type,
- const JS::ReadOnlyCompileOptions& script)
- {
-- return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, &script);
-+ return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, nullptr);
- }
-
- void
-@@ -485,7 +500,7 @@ TraceLoggerThread::startEvent(uint32_t id)
- if (!traceLoggerState->isTextIdEnabled(id))
- return;
-
-- logTimestamp(id);
-+ log(id);
- }
-
- void
-@@ -510,7 +525,7 @@ TraceLoggerThread::stopEvent(uint32_t id)
- if (!traceLoggerState->isTextIdEnabled(id))
- return;
-
-- logTimestamp(TraceLogger_Stop);
-+ log(TraceLogger_Stop);
- }
-
- void
-@@ -522,23 +537,57 @@ TraceLoggerThread::logTimestamp(TraceLoggerTextId id)
- void
- TraceLoggerThread::logTimestamp(uint32_t id)
- {
-+ MOZ_ASSERT(id > TraceLogger_LastTreeItem && id < TraceLogger_Last);
-+ log(id);
-+}
-+
-+void
-+TraceLoggerThread::log(uint32_t id)
-+{
- if (enabled == 0)
- return;
-
- MOZ_ASSERT(traceLoggerState);
-- if (!events.ensureSpaceBeforeAdd()) {
-+
-+ // We request for 3 items to add, since if we don't have enough room
-+ // we record the time it took to make more place. To log this information
-+ // we need 2 extra free entries.
-+ if (!events.hasSpaceForAdd(3)) {
- uint64_t start = rdtsc() - traceLoggerState->startupTime;
-
-- if (graph.get())
-- graph->log(events);
-+ if (!events.ensureSpaceBeforeAdd(3)) {
-+ if (graph.get())
-+ graph->log(events);
-+
-+ iteration_++;
-+ events.clear();
-+
-+ // Remove the item in the pointerMap for which the payloads
-+ // have no uses anymore
-+ for (PointerHashMap::Enum e(pointerMap); !e.empty(); e.popFront()) {
-+ if (e.front().value()->uses() != 0)
-+ continue;
-+
-+ TextIdHashMap::Ptr p = textIdPayloads.lookup(e.front().value()->textId());
-+ MOZ_ASSERT(p);
-+ textIdPayloads.remove(p);
-+
-+ e.removeFront();
-+ }
-
-- iteration_++;
-- events.clear();
-+ // Free all payloads that have no uses anymore.
-+ for (TextIdHashMap::Enum e(textIdPayloads); !e.empty(); e.popFront()) {
-+ if (e.front().value()->uses() == 0) {
-+ js_delete(e.front().value());
-+ e.removeFront();
-+ }
-+ }
-+ }
-
- // Log the time it took to flush the events as being from the
- // Tracelogger.
- if (graph.get()) {
-- MOZ_ASSERT(events.capacity() > 2);
-+ MOZ_ASSERT(events.hasSpaceForAdd(2));
- EventEntry& entryStart = events.pushUninitialized();
- entryStart.time = start;
- entryStart.textId = TraceLogger_Internal;
-@@ -548,13 +597,6 @@ TraceLoggerThread::logTimestamp(uint32_t id)
- entryStop.textId = TraceLogger_Stop;
- }
-
-- // Free all TextEvents that have no uses anymore.
-- for (TextIdHashMap::Enum e(extraTextId); !e.empty(); e.popFront()) {
-- if (e.front().value()->uses() == 0) {
-- js_delete(e.front().value());
-- e.removeFront();
-- }
-- }
- }
-
- uint64_t time = rdtsc() - traceLoggerState->startupTime;
-@@ -956,3 +998,16 @@ TraceLoggerEvent::~TraceLoggerEvent()
- if (payload_)
- payload_->release();
- }
-+
-+TraceLoggerEvent&
-+TraceLoggerEvent::operator=(const TraceLoggerEvent& other)
-+{
-+ if (hasPayload())
-+ payload()->release();
-+ if (other.hasPayload())
-+ other.payload()->use();
-+
-+ payload_ = other.payload_;
-+
-+ return *this;
-+}
-diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h
-index a124dcb..91a1eb0 100644
---- a/js/src/vm/TraceLogging.h
-+++ b/js/src/vm/TraceLogging.h
-@@ -110,6 +110,9 @@ class TraceLoggerEvent {
- bool hasPayload() const {
- return !!payload_;
- }
-+
-+ TraceLoggerEvent& operator=(const TraceLoggerEvent& other);
-+ TraceLoggerEvent(const TraceLoggerEvent& event) = delete;
- };
-
- /**
-@@ -130,6 +133,10 @@ class TraceLoggerEventPayload {
- uses_(0)
- { }
-
-+ ~TraceLoggerEventPayload() {
-+ MOZ_ASSERT(uses_ == 0);
-+ }
-+
- uint32_t textId() {
- return textId_;
- }
-@@ -166,7 +173,8 @@ class TraceLoggerThread
- mozilla::UniquePtr<TraceLoggerGraph> graph;
-
- PointerHashMap pointerMap;
-- TextIdHashMap extraTextId;
-+ TextIdHashMap textIdPayloads;
-+ uint32_t nextTextId;
-
- ContinuousSpace<EventEntry> events;
-
-@@ -181,6 +189,7 @@ class TraceLoggerThread
- : enabled(0),
- failed(false),
- graph(),
-+ nextTextId(TraceLogger_Last),
- iteration_(0),
- top(nullptr)
- { }
-@@ -195,22 +204,22 @@ class TraceLoggerThread
- bool enable(JSContext* cx);
- bool disable();
-
-- // Given the previous iteration and lastEntryId, return an array of events
-+ // Given the previous iteration and size, return an array of events
- // (there could be lost events). At the same time update the iteration and
-- // lastEntry and gives back how many events there are.
-- EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastEntryId, size_t* num) {
-+ // size and gives back how many events there are.
-+ EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastSize, size_t* num) {
- EventEntry* start;
- if (iteration_ == *lastIteration) {
-- MOZ_ASSERT(events.lastEntryId() >= *lastEntryId);
-- *num = events.lastEntryId() - *lastEntryId;
-- start = events.data() + *lastEntryId + 1;
-+ MOZ_ASSERT(*lastSize <= events.size());
-+ *num = events.size() - *lastSize;
-+ start = events.data() + *lastSize;
- } else {
-- *num = events.lastEntryId() + 1;
-+ *num = events.size();
- start = events.data();
- }
-
- *lastIteration = iteration_;
-- *lastEntryId = events.lastEntryId();
-+ *lastSize = events.size();
- return start;
- }
-
-@@ -220,16 +229,16 @@ class TraceLoggerThread
- const char** lineno, size_t* lineno_len, const char** colno,
- size_t* colno_len);
-
-- bool lostEvents(uint32_t lastIteration, uint32_t lastEntryId) {
-+ bool lostEvents(uint32_t lastIteration, uint32_t lastSize) {
- // If still logging in the same iteration, there are no lost events.
- if (lastIteration == iteration_) {
-- MOZ_ASSERT(lastEntryId <= events.lastEntryId());
-+ MOZ_ASSERT(lastSize <= events.size());
- return false;
- }
-
-- // When proceeded to the next iteration and lastEntryId points to
-- // the maximum capacity there are no logs that are lost.
-- if (lastIteration + 1 == iteration_ && lastEntryId == events.capacity())
-+ // If we are in a consecutive iteration we are only sure we didn't lose any events,
-+ // when the lastSize equals the maximum size 'events' can get.
-+ if (lastIteration == iteration_ - 1 && lastSize == events.maxSize())
- return false;
-
- return true;
-@@ -268,6 +277,7 @@ class TraceLoggerThread
- void stopEvent(uint32_t id);
- private:
- void stopEvent();
-+ void log(uint32_t id);
-
- public:
- static unsigned offsetOfEnabled() {
-diff --git a/js/src/vm/TraceLoggingGraph.cpp b/js/src/vm/TraceLoggingGraph.cpp
-index d1b7f2e..a4eb273 100644
---- a/js/src/vm/TraceLoggingGraph.cpp
-+++ b/js/src/vm/TraceLoggingGraph.cpp
-@@ -276,7 +276,7 @@ TraceLoggerGraph::flush()
- if (bytesWritten < tree.size())
- return false;
-
-- treeOffset += tree.lastEntryId();
-+ treeOffset += tree.size();
- tree.clear();
- }
-
-@@ -359,7 +359,7 @@ TraceLoggerGraph::startEventInternal(uint32_t id, uint64_t timestamp)
-
- if (parent.lastChildId() == 0) {
- MOZ_ASSERT(!entry.hasChildren());
-- MOZ_ASSERT(parent.treeId() == tree.lastEntryId() + treeOffset);
-+ MOZ_ASSERT(parent.treeId() == treeOffset + tree.size() - 1);
-
- if (!updateHasChildren(parent.treeId()))
- return false;
-diff --git a/js/src/vm/TraceLoggingTypes.h b/js/src/vm/TraceLoggingTypes.h
-index f1c9d0c..10b76d6 100644
---- a/js/src/vm/TraceLoggingTypes.h
-+++ b/js/src/vm/TraceLoggingTypes.h
-@@ -21,7 +21,6 @@
- _(Internal) \
- _(Interpreter) \
- _(InlinedScripts) \
-- _(Invalidation) \
- _(IonCompilation) \
- _(IonCompilationPaused) \
- _(IonLinking) \
-@@ -60,6 +59,7 @@
-
- #define TRACELOGGER_LOG_ITEMS(_) \
- _(Bailout) \
-+ _(Invalidation) \
- _(Disable) \
- _(Enable) \
- _(Stop)
-@@ -130,6 +130,9 @@ class ContinuousSpace {
- uint32_t size_;
- uint32_t capacity_;
-
-+ // The maximum amount of ram memory a continuous space structure can take (in bytes).
-+ static const uint32_t LIMIT = 200 * 1024 * 1024;
-+
- public:
- ContinuousSpace ()
- : data_(nullptr)
-@@ -151,6 +154,10 @@ class ContinuousSpace {
- data_ = nullptr;
- }
-
-+ static uint32_t maxSize() {
-+ return LIMIT / sizeof(T);
-+ }
-+
- T* data() {
- return data_;
- }
-@@ -187,11 +194,14 @@ class ContinuousSpace {
- if (hasSpaceForAdd(count))
- return true;
-
-+ // Limit the size of a continuous buffer.
-+ if (size_ + count > maxSize())
-+ return false;
-+
- uint32_t nCapacity = capacity_ * 2;
-- if (size_ + count > nCapacity)
-- nCapacity = size_ + count;
-- T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T));
-+ nCapacity = (nCapacity < maxSize()) ? nCapacity : maxSize();
-
-+ T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T));
- if (!entries)
- return false;
-
Deleted: mozjs38-install-name.patch
===================================================================
--- mozjs38-install-name.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-install-name.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,11 +0,0 @@
---- a/config/rules.mk 2016-11-09 23:51:17.000000000 -0800
-+++ b/config/rules.mk 2016-11-09 23:54:23.000000000 -0800
-@@ -393,7 +393,7 @@
- ifdef IS_COMPONENT
- EXTRA_DSO_LDOPTS += -bundle
- else
--EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
-+EXTRA_DSO_LDOPTS += -dynamiclib -install_name $(abspath $(prefix))/lib/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
- endif
- endif
- endif
Deleted: mozjs38-pkg-config-version.patch
===================================================================
--- mozjs38-pkg-config-version.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-pkg-config-version.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,22 +0,0 @@
-Add major version to pkg-config filename.
-Author: Rico Tzschichholz <ricotz at ubuntu.com>
-Forwarded: no
-Last-Update: 2015-05-04
-
-Index: b/js/src/Makefile.in
-===================================================================
---- a/js/src/Makefile.in
-+++ b/js/src/Makefile.in
-@@ -214,10 +214,10 @@
- $(JS_CONFIG_NAME): js-config
- cp $^ $@
-
--$(LIBRARY_NAME).pc: js.pc
-+$(JS_LIBRARY_NAME).pc: js.pc
- cp $^ $@
-
--install:: $(LIBRARY_NAME).pc
-+install:: $(JS_LIBRARY_NAME).pc
- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
-
- install:: js-config.h
Deleted: mozjs38-shell-version.patch
===================================================================
--- mozjs38-shell-version.patch 2017-09-14 21:17:42 UTC (rev 305574)
+++ mozjs38-shell-version.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -1,65 +0,0 @@
-# HG changeset patch
-# Parent 4732a0e5d22bc7e5c1f1ace7a182d537d9cc2c6a
-Add major version to shell and js-config filenames.
-Author: Rico Tzschichholz <ricotz at ubuntu.com>
-Forwarded: no
-Last-Update: 2014-10-29
-
----
-diff --git a/js/src/configure b/js/src/configure
---- a/js/src/configure
-+++ b/js/src/configure
-@@ -1696,8 +1696,13 @@
- MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
- IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
-
-+if test -n "$JS_STANDALONE"; then
-+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
-+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
-+else
- JS_SHELL_NAME=js
- JS_CONFIG_NAME=js-config
-+fi
-
-
- if test -n "$IS_ALPHA"; then
-
-diff --git a/js/src/configure.in b/js/src/configure.in
---- a/js/src/configure.in
-+++ b/js/src/configure.in
-@@ -234,16 +234,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI
- MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
- IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
-
--dnl XXX in a temporary bid to avoid developer anger at renaming files
--dnl XXX before "js" symlinks exist, don't change names.
--dnl
--dnl if test -n "$JS_STANDALONE"; then
--dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
--dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
--dnl else
-+if test -n "$JS_STANDALONE"; then
-+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
-+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
-+else
- JS_SHELL_NAME=js
- JS_CONFIG_NAME=js-config
--dnl fi
-+fi
-
- changequote([,])
- if test -n "$IS_ALPHA"; then
-
-diff -r 80a9e64d75f5 js/src/Makefile.in
---- a/js/src/Makefile.in Wed Jun 25 15:11:42 2014 +0200
-+++ b/js/src/Makefile.in Sat Jul 05 14:08:38 2014 +0200
-@@ -273,6 +273,9 @@
- SCRIPTS = $(JS_CONFIG_NAME)
- SDK_BINARY = $(JS_CONFIG_NAME)
-
-+$(JS_CONFIG_NAME): js-config
-+ cp $^ $@
-+
- $(LIBRARY_NAME).pc: js.pc
- cp $^ $@
-
Copied: js52/trunk/mozjs52-copy-headers.patch (from rev 305574, js52/trunk/mozjs38-copy-headers.patch)
===================================================================
--- mozjs52-copy-headers.patch (rev 0)
+++ mozjs52-copy-headers.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -0,0 +1,30 @@
+From 8b2d7a77bfb4dbd513763501ed7e9722058ee9af Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz at ubuntu.com>
+Date: Wed, 5 Jul 2017 22:45:59 -0700
+Subject: [PATCH] build: Copy headers on install instead of symlinking
+
+Patch ported forward to mozjs52 by Philip Chimento
+<philip.chimento at gmail.com>.
+---
+ python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
+index 132dcf94..33d489a6 100644
+--- a/python/mozbuild/mozbuild/backend/recursivemake.py
++++ b/python/mozbuild/mozbuild/backend/recursivemake.py
+@@ -1307,11 +1307,11 @@ def _process_final_target_files(self, obj, files, backend_file):
+ raise Exception("Wildcards are only supported in the filename part of "
+ "srcdir-relative or absolute paths.")
+
+- install_manifest.add_pattern_symlink(basepath, wild, path)
++ install_manifest.add_pattern_copy(basepath, wild, path)
+ else:
+- install_manifest.add_pattern_symlink(f.srcdir, f, path)
++ install_manifest.add_pattern_copy(f.srcdir, f, path)
+ else:
+- install_manifest.add_symlink(f.full_path, dest)
++ install_manifest.add_copy(f.full_path, dest)
+ else:
+ install_manifest.add_optional_exists(dest)
+ backend_file.write('%s_FILES += %s\n' % (
Added: mozjs52-disable-mozglue.patch
===================================================================
--- mozjs52-disable-mozglue.patch (rev 0)
+++ mozjs52-disable-mozglue.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -0,0 +1,66 @@
+From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
+From: Till Schneidereit <till at tillschneidereit.net>
+Date: Thu, 1 Oct 2015 12:59:09 +0200
+Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all
+ platforms
+
+Otherwise, build fails not being able to find HashBytes.
+
+Patch ported forward to mozjs52 by Philip Chimento
+<philip.chimento at gmail.com>.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
+---
+ js/src/old-configure.in | 23 ++++++++++++++---------
+ mozglue/build/moz.build | 2 +-
+ 2 files changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+index 1c5c9e21..ff0617e3 100644
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -1623,16 +1623,21 @@ dnl ========================================================
+ dnl = Enable jemalloc
+ dnl ========================================================
+
+-case "${OS_TARGET}" in
+-Android|WINNT|Darwin)
++dnl In stand-alone builds we always only want to link executables against mozglue.
++if test "$JS_STANDALONE"; then
+ MOZ_GLUE_IN_PROGRAM=
+- ;;
+-*)
+- dnl On !Android !Windows !OSX, we only want to link executables against mozglue
+- MOZ_GLUE_IN_PROGRAM=1
+- AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
+- ;;
+-esac
++else
++ case "${OS_TARGET}" in
++ Android|WINNT|Darwin)
++ MOZ_GLUE_IN_PROGRAM=
++ ;;
++ *)
++ dnl On !Android !Windows !OSX, we only want to link executables against mozglue
++ MOZ_GLUE_IN_PROGRAM=1
++ AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
++ ;;
++ esac
++fi
+
+ if test "$MOZ_MEMORY"; then
+ if test "x$MOZ_DEBUG" = "x1"; then
+diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
+index d2897477..e3be5a2b 100644
+--- a/mozglue/build/moz.build
++++ b/mozglue/build/moz.build
+@@ -6,7 +6,7 @@
+
+ # Build mozglue as a shared lib on Windows, OSX and Android.
+ # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
+-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
++if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
+ SharedLibrary('mozglue')
+ else:
+ Library('mozglue')
+
Added: mozjs52-fix-soname.patch
===================================================================
--- mozjs52-fix-soname.patch (rev 0)
+++ mozjs52-fix-soname.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -0,0 +1,34 @@
+From: Laszlo Boszormenyi (GCS) <gcs at debian.org>
+Date: Fri, 02 May 2014 22:20:45 +0200
+Subject: fix soname
+
+Add soname switch to linker, regardless of Operating System
+
+Bug-Debian: http://bugs.debian.org/746705
+---
+ config/rules.mk | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+Index: mozjs52-52.2.1~artful1/config/rules.mk
+===================================================================
+--- mozjs52-52.2.1~artful1.orig/config/rules.mk
++++ mozjs52-52.2.1~artful1/config/rules.mk
+@@ -418,7 +418,7 @@ endif # AIX
+ #
+ # Linux: add -Bsymbolic flag for components
+ #
+-ifeq ($(OS_ARCH),Linux)
++#ifeq ($(OS_ARCH),Linux)
+ ifdef IS_COMPONENT
+ EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
+ endif
+@@ -426,7 +426,8 @@ ifdef LD_VERSION_SCRIPT
+ EXTRA_DSO_LDOPTS += -Wl,--version-script,$(LD_VERSION_SCRIPT)
+ EXTRA_DEPS += $(LD_VERSION_SCRIPT)
+ endif
+-endif
++#endif
++EXTRA_DSO_LDOPTS += -Wl,-soname,lib$(JS_LIBRARY_NAME).so.0
+
+ ifdef SYMBOLS_FILE
+ ifeq ($(OS_TARGET),WINNT)
Added: mozjs52-include-configure-script.patch
===================================================================
--- mozjs52-include-configure-script.patch (rev 0)
+++ mozjs52-include-configure-script.patch 2017-09-14 21:34:40 UTC (rev 305575)
@@ -0,0 +1,63 @@
+From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento at gmail.com>
+Date: Wed, 5 Jul 2017 22:57:09 -0700
+Subject: [PATCH] build: Include configure script, be nicer about options
+
+A configure script is not included in the SpiderMonkey tarball by
+default. Also, we have to account for JHbuild passing extra unknown
+options like --disable-Werror.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
+---
+ js/src/configure | 9 +++++++++
+ python/mozbuild/mozbuild/configure/__init__.py | 2 +-
+ python/mozbuild/mozbuild/configure/options.py | 6 +++++-
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100755 js/src/configure
+
+diff --git a/js/src/configure b/js/src/configure
+new file mode 100755
+index 00000000..f1ef8c49
+--- /dev/null
++++ b/js/src/configure
+@@ -0,0 +1,9 @@
++#!/bin/sh
++
++SRCDIR=$(dirname $0)
++TOPSRCDIR="$SRCDIR"/../..
++export OLD_CONFIGURE="$SRCDIR"/old-configure
++
++set -- "$@" --enable-project=js
++
++which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
+diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
+index 0fe640ca..09b460d3 100644
+--- a/python/mozbuild/mozbuild/configure/__init__.py
++++ b/python/mozbuild/mozbuild/configure/__init__.py
+@@ -356,7 +356,7 @@ def run(self, path=None):
+ # All options should have been removed (handled) by now.
+ for arg in self._helper:
+ without_value = arg.split('=', 1)[0]
+- raise InvalidOptionError('Unknown option: %s' % without_value)
++ print('Ignoring', without_value, ': Unknown option')
+
+ # Run the execution queue
+ for func, args in self._execution_queue:
+diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
+index 4310c862..15bfe425 100644
+--- a/python/mozbuild/mozbuild/configure/options.py
++++ b/python/mozbuild/mozbuild/configure/options.py
+@@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
+
+ def add(self, arg, origin='command-line', args=None):
+ assert origin != 'default'
+- prefix, name, values = Option.split_option(arg)
++ try:
++ prefix, name, values = Option.split_option(arg)
++ except InvalidOptionError as e:
++ print('Ignoring', arg, ':', e)
++ return
+ if args is None:
+ args = self._extra_args
+ if args is self._extra_args and name in self._extra_args:
+
More information about the arch-commits
mailing list