Submitted By: Douglas R. Reno Date: 2017-04-01 Inital Package Version: 38.2.1 Upstream Status: Declined Origin: https://git.gnome.org/browse/jhbuild/tree/patches Description: Fixes build and functionality problems within mozjs38. diff -Naurp mozjs-38.0.0.orig/build/autoconf/icu.m4 mozjs-38.0.0/build/autoconf/icu.m4 --- mozjs-38.0.0.orig/build/autoconf/icu.m4 2015-09-17 15:12:19.000000000 -0500 +++ mozjs-38.0.0/build/autoconf/icu.m4 2017-04-01 19:31:59.957994136 -0500 @@ -73,7 +73,8 @@ if test -n "$USE_ICU"; then 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"` + version=57.1 if test x"$version" = x; then AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) fi diff -Naurp mozjs-38.0.0.orig/js/src/configure mozjs-38.0.0/js/src/configure --- mozjs-38.0.0.orig/js/src/configure 2015-09-17 15:38:10.000000000 -0500 +++ mozjs-38.0.0/js/src/configure 2017-04-01 19:31:59.958994141 -0500 @@ -1662,9 +1662,9 @@ esac fi -MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` -MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` -MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` +MOZILLA_VERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` +MOZILLA_UAVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` +MOZILLA_SYMBOLVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` cat >> confdefs.pytmp < typed; - mozilla::AlignedStorage2 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 @@ class TypedOrValueRegister } 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 @@ class ConstantOrRegister // Whether a constant value is being stored. bool constant_; - // Space to hold either a Value or a TypedOrValueRegister. union U { - mozilla::AlignedStorage2 constant; - mozilla::AlignedStorage2 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: diff -Naurp mozjs-38.0.0.orig/js/src/Makefile.in mozjs-38.0.0/js/src/Makefile.in --- mozjs-38.0.0.orig/js/src/Makefile.in 2015-09-17 15:12:18.000000000 -0500 +++ mozjs-38.0.0/js/src/Makefile.in 2017-04-01 19:31:59.961994157 -0500 @@ -208,10 +208,13 @@ endif SCRIPTS = $(JS_CONFIG_NAME) SDK_BINARY = $(JS_CONFIG_NAME) -$(LIBRARY_NAME).pc: js.pc +$(JS_CONFIG_NAME): js-config cp $^ $@ -install:: $(LIBRARY_NAME).pc +$(JS_LIBRARY_NAME).pc: js.pc + cp $^ $@ + +install:: $(JS_LIBRARY_NAME).pc $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig install:: js-config.h