mozjs: 17.0.0 -> 52.8.1

- Refactor recipe 52.8.1
  0001 ~ 0006

- Rebase patches to 52.8.1;
  0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch
  0010-fix-cross-compilation-on-i586-targets.patch'

- Drop 0001-regenerate-configure.patch and everything works well

- Drop Manually_mmap_heap_memory_esr17.patch which is backported

- Drop obsolete patches
  0001-compare-the-first-character-of-string-to-be-null-or-.patch
  0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch
  0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch
  0004-mozbug746112-no-decommit-on-large-pages.patch
  0005-aarch64-64k-page.patch
  fix_milestone_compile_issue.patch
  fix-the-compile-error-of-powerpc64.patch
  Update-Double-Conversion.patch and Update-the-double-conversion-update-script.patch

- Set DISABLE_STATIC = "" to build without option `--disable-static'

- Set musl patch (0006-support-musl.patch) with musl override.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Hongxu Jia
2018-07-17 09:31:44 +08:00
committed by Khem Raj
parent 2de6f8d1b4
commit 50e8ed5fd4
21 changed files with 516 additions and 5711 deletions
@@ -1,32 +0,0 @@
From f36c9476d2816e0d3e61c9e13c22ed73883cb54a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 24 Apr 2017 12:13:43 -0700
Subject: [PATCH] compare the first character of string to be null or not
Fixes
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
| if (value[0] == '\0')
| ^~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
js/src/shell/jsoptparse.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp
index b49d0a5..612aa00 100644
--- a/js/src/shell/jsoptparse.cpp
+++ b/js/src/shell/jsoptparse.cpp
@@ -243,7 +243,7 @@ OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value)
char *eq = strchr(argv[*i], '=');
if (eq) {
*value = eq + 1;
- if (value[0] == '\0')
+ if (value[0][0] == '\0')
return error("A value is required for option %.*s", eq - argv[*i], argv[*i]);
return Okay;
}
--
2.12.2
@@ -0,0 +1,91 @@
From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 15:04:47 +0800
Subject: [PATCH 1/5] do not create python environment
Use oe's python environment rather than create one of host
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/init.configure | 18 ------------------
configure.py | 10 +++++++++-
js/src/old-configure | 4 ++--
3 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 2123beb..6fe6591 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -179,24 +179,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help):
else:
python = sys.executable
- if not manager.up_to_date(python):
- log.info('Creating Python environment')
- manager.build(python)
-
- python = normsep(manager.python_path)
-
- if python != normsep(sys.executable):
- log.info('Reexecuting in the virtualenv')
- if env_python:
- del os.environ['PYTHON']
- # One would prefer to use os.execl, but that's completely borked on
- # Windows.
- sys.exit(subprocess.call([python] + sys.argv))
-
- # We are now in the virtualenv
- if not distutils.sysconfig.get_python_lib():
- die('Could not determine python site packages directory')
-
return python
set_config('PYTHON', virtualenv_python)
diff --git a/configure.py b/configure.py
index f7392d0..45323a5 100644
--- a/configure.py
+++ b/configure.py
@@ -12,7 +12,15 @@ import textwrap
base_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild'))
+sys.path.insert(0, os.path.join(base_dir, 'config'))
+def get_immediate_subdirectories(a_dir):
+ return [name for name in os.listdir(a_dir)
+ if os.path.isdir(os.path.join(a_dir, name))]
+for s in ["python", "testing/mozbase"]:
+ sub_dir = os.path.join(base_dir, s)
+ for module_dir in get_immediate_subdirectories(sub_dir):
+ sys.path.insert(0, os.path.join(sub_dir, module_dir))
+
from mozbuild.configure import ConfigureSandbox
from mozbuild.util import (
indented_repr,
diff --git a/js/src/old-configure b/js/src/old-configure
index ee4527b..75b00e1 100644
--- a/js/src/old-configure
+++ b/js/src/old-configure
@@ -10512,7 +10512,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
;;
esac
- eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
+ eval $dumpenv PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args
done
@@ -10931,7 +10931,7 @@ if test "$JS_STANDALONE"; then
if test "$no_recursion" != yes; then
trap '' EXIT
- if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
+ if ! PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
exit 1
fi
fi
--
2.7.4
@@ -3,33 +3,31 @@ From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Thu, 6 Jun 2013 18:36:01 +0200
Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending
packages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
in our cross environment the would fail with:
| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory
and currently it only defines __STDC_LIMIT_MACROS
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
js.pc.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/js.pc.in b/js.pc.in
index 13d761d..a95a7bd 100644
--- a/js.pc.in
+++ b/js.pc.in
Rebase to 52.8.1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
js/src/js.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/js.pc.in b/js/src/js.pc.in
index 2eae393..c2dea62 100644
--- a/js/src/js.pc.in
+++ b/js/src/js.pc.in
@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
Version: @MOZILLA_VERSION@
Requires.private: @NSPR_PKGCONF_CHECK@
Libs: -L${libdir} -l@LIBRARY_NAME@
-Cflags: -include ${includedir}/@MODULE@/js/RequiredDefines.h -I${includedir}/@MODULE@
+Cflags: -I${includedir}/@MODULE@
@PKGCONF_REQUIRES_PRIVATE@
Libs: -L${libdir} -l@JS_LIBRARY_NAME@
-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@
+Cflags: -I${includedir}/@JS_LIBRARY_NAME@
--
1.7.6.5
2.7.4
@@ -1,36 +0,0 @@
From da3929a96d9c74e11bf37d128890e18fcb745365 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Mon, 26 Jan 2015 08:53:19 +0900
Subject: [PATCH] mozjs17.0.0: fix the compile bug of powerpc
To fix the bug as following
error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for
argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**,
JSBool, jsval**, __va_list_tag (*)[1])'
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
jscpucfg.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/jscpucfg.h b/jscpucfg.h
index dfb1c14..8683491 100644
--- a/jscpucfg.h
+++ b/jscpucfg.h
@@ -47,6 +47,12 @@
#elif defined(JS_HAVE_ENDIAN_H)
# include <endian.h>
+#if defined(_POWER) || defined(__powerpc__) || \
+ defined(__ppc__)
+# define HAVE_VA_LIST_AS_ARRAY 1
+# endif
+
+
# if defined(__BYTE_ORDER)
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN 1
--
1.8.4.2
File diff suppressed because it is too large Load Diff
@@ -1,75 +0,0 @@
From d4a15ad82292ff6d772dcc631df98754d20be31b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Tue, 18 Mar 2014 11:46:05 -0400
Subject: [PATCH 2/5] Move JS_BYTES_PER_WORD out of config.h
Instead define it in terms of the already extant GNU C extension
__SIZEOF_POINTER__. This avoids multiarch conflicts when 32 and 64
bit packages of js are co-installed.
---
Upstream-status: Pending
js/src/configure.in | 9 ---------
js/src/js-config.h.in | 1 -
js/src/jstypes.h | 12 ++++++++++++
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/js/src/configure.in b/js/src/configure.in
index 15605b2..64c7606 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2345,15 +2345,6 @@ else
AC_MSG_RESULT(no)
fi
-MOZ_SIZE_OF_TYPE(JS_BYTES_PER_WORD, void*, 4 8)
-if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 5)
-elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 6)
-else
- AC_MSG_ERROR([Unexpected JS_BYTES_PER_WORD])
-fi
-
MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16)
MOZ_SIZE_OF_TYPE(JS_BYTES_PER_DOUBLE, double, 6 8 10 12 14)
diff --git a/js/src/js-config.h.in b/js/src/js-config.h.in
index 6889e00..4775420 100644
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -56,7 +56,6 @@
#undef JS_INT32_TYPE
#undef JS_INT64_TYPE
#undef JS_INTPTR_TYPE
-#undef JS_BYTES_PER_WORD
/* Some mozilla code uses JS-friend APIs that depend on JS_METHODJIT being
correct. */
diff --git a/js/src/jstypes.h b/js/src/jstypes.h
index d0cf183..3e7928f 100644
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -24,6 +24,18 @@
#include "mozilla/Util.h"
#include "js-config.h"
+#ifndef JS_BYTES_PER_WORD
+#define JS_BYTES_PER_WORD __SIZEOF_POINTER__
+#endif
+#ifndef JS_BITS_PER_WORD_LOG2
+#if JS_BYTES_PER_WORD == 8
+#define JS_BITS_PER_WORD_LOG2 6
+#elif JS_BYTES_PER_WORD == 4
+#define JS_BITS_PER_WORD_LOG2 5
+#else
+#error Unhandled JS_BYTES_PER_WORD
+#endif
+#endif
/***********************************************************************
** MACROS: JS_EXTERN_API
--
1.9.3
@@ -0,0 +1,34 @@
From e6dcee5f8a0f80ce99946b81fa1233611a149fe6 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 18:00:52 +0800
Subject: [PATCH 2/5] fix cannot find link
..
|DEBUG: link: Trying 'mips64-wrs-linux-ld --sysroot=tmp-glibc/work/
mips64-wrs-linux/mozjs/52.8.1-r0/recipe-sysroot '
|ERROR: Cannot find link
...
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/checks.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure
index 8c2dbc0..83bffc3 100644
--- a/build/moz.configure/checks.configure
+++ b/build/moz.configure/checks.configure
@@ -128,7 +128,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False,
for prog in value or progs:
log.debug('%s: Trying %s', var.lower(), quote(prog))
- result = find_program(prog, paths)
+ result = find_program(prog.split()[0], paths)
if result:
return result
--
2.7.4
@@ -0,0 +1,28 @@
From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 18:12:42 +0800
Subject: [PATCH 3/5] workaround autoconf 2.13 detection failed
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/old.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index b32c3f7..ece47f4 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -31,7 +31,7 @@ def autoconf(mozconfig, autoconf):
autoconf = autoconf[0] if autoconf else None
for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13',
- 'autoconf213'):
+ 'autoconf213', 'autoconf'):
if ac:
autoconf = find_program(ac)
if autoconf:
--
2.7.4
@@ -0,0 +1,42 @@
From a46adb74b5ba5e17d676d31d70faca76c1381d15 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 21:25:46 +0800
Subject: [PATCH 4/5] do not use autoconf 2.13 to refresh old.configure
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/old.configure | 2 +-
js/src/old-configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index ece47f4..a73900f 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -83,7 +83,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
old_configure = os.path.join(old_configure_dir, 'js', 'src',
os.path.basename(old_configure))
- refresh = True
+ refresh = False
if exists(old_configure):
mtime = getmtime(old_configure)
aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf',
diff --git a/js/src/old-configure b/js/src/old-configure
index 75b00e1..8a8ef52 100644
--- a/js/src/old-configure
+++ b/js/src/old-configure
@@ -619,7 +619,7 @@ if test -z "$srcdir"; then
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
+ srcdir="$ac_confdir/../../"
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
--
2.7.4
@@ -1,103 +0,0 @@
From 0128c5a9eeee0d3fc0deb9129dd20eb79338c8f4 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Mon, 2 Mar 2015 19:08:59 +0800
Subject: [PATCH 4/5] mozbug746112-no-decommit-on-large-pages
---
Upstream-status: Pending
js/src/gc/Heap.h | 15 ++++++++++-----
js/src/jsgc.cpp | 15 ++++++++++++---
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
index b8f8c78..1cfd269 100644
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -103,26 +103,31 @@ struct Cell
};
/*
- * Page size is 4096 by default, except for SPARC, where it is 8192.
+ * Page size must be static to support our arena pointer optimizations, so we
+ * are forced to support each platform with non-4096 pages as a special case.
+ * Note: The freelist supports a maximum arena shift of 15.
* Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
* Bug 692267: Move page size definition to gc/Memory.h and include it
* directly once jsgc.h is no longer an installed header.
*/
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
const size_t PageShift = 13;
+const size_t ArenaShift = PageShift;
+#elif defined(__powerpc__)
+const size_t PageShift = 16;
+const size_t ArenaShift = 12;
#else
const size_t PageShift = 12;
+const size_t ArenaShift = PageShift;
#endif
const size_t PageSize = size_t(1) << PageShift;
+const size_t ArenaSize = size_t(1) << ArenaShift;
+const size_t ArenaMask = ArenaSize - 1;
const size_t ChunkShift = 20;
const size_t ChunkSize = size_t(1) << ChunkShift;
const size_t ChunkMask = ChunkSize - 1;
-const size_t ArenaShift = PageShift;
-const size_t ArenaSize = PageSize;
-const size_t ArenaMask = ArenaSize - 1;
-
/*
* This is the maximum number of arenas we allow in the FreeCommitted state
* before we trigger a GC_SHRINK to release free arenas to the OS.
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index b3caf05..a258d2d 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] = {
sizeof(BackgroundPhaseStrings) / sizeof(AllocKind)
};
+/* Unused memory decommiting requires the arena size match the page size. */
+static bool
+DecommitEnabled()
+{
+ return PageSize == ArenaSize;
+}
+
#ifdef DEBUG
void
ArenaHeader::checkSynchronizedWithFreeList() const
@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena()
decommittedArenas.unset(offset);
Arena *arena = &arenas[offset];
- MarkPagesInUse(arena, ArenaSize);
+ if (DecommitEnabled())
+ MarkPagesInUse(arena, ArenaSize);
arena->aheader.setAsNotAllocated();
return &arena->aheader;
@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
chunk->removeFromAvailableList();
size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress());
- bool ok;
+ bool ok = true;
{
/*
* If the main thread waits for the decommit to finish, skip
@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
Maybe<AutoUnlockGC> maybeUnlock;
if (!rt->isHeapBusy())
maybeUnlock.construct(rt);
- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
+ if (DecommitEnabled())
+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
}
if (ok) {
--
1.9.3
@@ -1,44 +0,0 @@
From 9c42920c2b635a399bd1f93833efdeb1696f17ee Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Mon, 2 Mar 2015 19:09:57 +0800
Subject: [PATCH 5/5] aarch64-64k-page
---
Upstream-status: Pending
js/src/gc/Heap.h | 2 +-
js/src/gc/Memory.cpp | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
index 1cfd269..f4dbcda 100644
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -113,7 +113,7 @@ struct Cell
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
const size_t PageShift = 13;
const size_t ArenaShift = PageShift;
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__aarch64__)
const size_t PageShift = 16;
const size_t ArenaShift = 12;
#else
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 5b386a2..e5ad018 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -302,8 +302,11 @@ GetPageFaultCount()
void
InitMemorySubsystem()
{
+ /* aarch64 may have 64KB or 4KB pages */
+#ifndef __aarch64__
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
MOZ_CRASH();
+#endif
}
void *
--
1.9.3
@@ -0,0 +1,38 @@
From 55d833dc3c194f1eb7841f308ad3b9ec3800d3b3 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 13 Jul 2018 15:48:32 +0800
Subject: [PATCH 5/5] fix do_compile failed on mips
Link with var-OS_LDFLAGS to fix the issue.
Such as on mips:
...
|mips-wrsmllib32-linux-g++ -meb -mabi=32 -mhard-float ... -o libmozjs-52.so
|/usr/include/c++/8.1.0/bits/atomic_base.h:514: error: undefined
reference to '__atomic_fetch_add_8'
...
In recipe, set OS_LDFLAGS="-Wl,-latomic" could fix the issue.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
config/config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/config.mk b/config/config.mk
index 4e3fd1a..d847ffa 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -523,7 +523,7 @@ EXPAND_MKSHLIB_ARGS = --uselist
ifdef SYMBOL_ORDER
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
endif
-EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS)
# $(call CHECK_SYMBOLS,lib,PREFIX,dep_name,test)
# Checks that the given `lib` doesn't contain dependency on symbols with a
--
2.7.4
@@ -0,0 +1,158 @@
From 04e8a611e958f0da1ccac61acae3a6f1a5168b20 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 13 Jul 2018 18:08:14 +0800
Subject: [PATCH] support musl
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
memory/jemalloc/src/src/pages.c | 1 -
memory/mozjemalloc/jemalloc.c | 7 +++----
mozglue/misc/TimeStamp_darwin.cpp | 1 -
mozglue/misc/TimeStamp_posix.cpp | 1 -
nsprpub/pr/src/misc/prsystem.c | 1 -
python/psutil/psutil/_psutil_bsd.c | 1 -
python/psutil/psutil/_psutil_osx.c | 1 -
python/psutil/psutil/arch/bsd/process_info.c | 1 -
python/psutil/psutil/arch/osx/process_info.c | 1 -
9 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/memory/jemalloc/src/src/pages.c b/memory/jemalloc/src/src/pages.c
index 647952a..7b964c8 100644
--- a/memory/jemalloc/src/src/pages.c
+++ b/memory/jemalloc/src/src/pages.c
@@ -2,7 +2,6 @@
#include "jemalloc/internal/jemalloc_internal.h"
#ifdef JEMALLOC_SYSCTL_VM_OVERCOMMIT
-#include <sys/sysctl.h>
#endif
/******************************************************************************/
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
index 5d4d83a..c618de9 100644
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -332,7 +332,6 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib/malloc.c 180599 2008-07-18 19:35:44Z ja
#include <sys/time.h>
#include <sys/types.h>
#if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID)
-#include <sys/sysctl.h>
#endif
#include <sys/uio.h>
#ifndef MOZ_MEMORY
@@ -674,7 +673,7 @@ static bool malloc_initialized = false;
#elif defined(MOZ_MEMORY_DARWIN)
static malloc_mutex_t init_lock = {OS_SPINLOCK_INIT};
#elif defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
-static malloc_mutex_t init_lock = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
+static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
#elif defined(MOZ_MEMORY)
static malloc_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
#else
@@ -1644,7 +1643,7 @@ malloc_mutex_init(malloc_mutex_t *mutex)
pthread_mutexattr_t attr;
if (pthread_mutexattr_init(&attr) != 0)
return (true);
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
if (pthread_mutex_init(mutex, &attr) != 0) {
pthread_mutexattr_destroy(&attr);
return (true);
@@ -1709,7 +1708,7 @@ malloc_spin_init(malloc_spinlock_t *lock)
pthread_mutexattr_t attr;
if (pthread_mutexattr_init(&attr) != 0)
return (true);
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
if (pthread_mutex_init(lock, &attr) != 0) {
pthread_mutexattr_destroy(&attr);
return (true);
diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp
index f30bc98..3998c9c 100644
--- a/mozglue/misc/TimeStamp_darwin.cpp
+++ b/mozglue/misc/TimeStamp_darwin.cpp
@@ -18,7 +18,6 @@
#include <mach/mach_time.h>
#include <sys/time.h>
-#include <sys/sysctl.h>
#include <time.h>
#include <unistd.h>
diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp
index 05dedde..d9e30f2 100644
--- a/mozglue/misc/TimeStamp_posix.cpp
+++ b/mozglue/misc/TimeStamp_posix.cpp
@@ -21,7 +21,6 @@
#if defined(__DragonFly__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
-#include <sys/sysctl.h>
#endif
#if defined(__DragonFly__) || defined(__FreeBSD__)
diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c
index eba85fb..54b57bb 100644
--- a/nsprpub/pr/src/misc/prsystem.c
+++ b/nsprpub/pr/src/misc/prsystem.c
@@ -27,7 +27,6 @@
|| defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN)
#define _PR_HAVE_SYSCTL
#include <sys/param.h>
-#include <sys/sysctl.h>
#endif
#if defined(DARWIN)
diff --git a/python/psutil/psutil/_psutil_bsd.c b/python/psutil/psutil/_psutil_bsd.c
index 7b6e561..0a91262 100644
--- a/python/psutil/psutil/_psutil_bsd.c
+++ b/python/psutil/psutil/_psutil_bsd.c
@@ -16,7 +16,6 @@
#include <fcntl.h>
#include <paths.h>
#include <sys/types.h>
-#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
diff --git a/python/psutil/psutil/_psutil_osx.c b/python/psutil/psutil/_psutil_osx.c
index 3ebf8ff..b3910ba 100644
--- a/python/psutil/psutil/_psutil_osx.c
+++ b/python/psutil/psutil/_psutil_osx.c
@@ -13,7 +13,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <utmpx.h>
-#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <libproc.h>
#include <sys/proc_info.h>
diff --git a/python/psutil/psutil/arch/bsd/process_info.c b/python/psutil/psutil/arch/bsd/process_info.c
index 4d73924..46f288d 100644
--- a/python/psutil/psutil/arch/bsd/process_info.c
+++ b/python/psutil/psutil/arch/bsd/process_info.c
@@ -15,7 +15,6 @@
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
diff --git a/python/psutil/psutil/arch/osx/process_info.c b/python/psutil/psutil/arch/osx/process_info.c
index b6dd5bb..62a838f 100644
--- a/python/psutil/psutil/arch/osx/process_info.c
+++ b/python/psutil/psutil/arch/osx/process_info.c
@@ -16,7 +16,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
-#include <sys/sysctl.h>
#include <libproc.h>
#include "process_info.h"
--
2.7.4
@@ -1,4 +1,4 @@
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
From: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Date: Tue, 5 Jan 2016 22:04:17 +0100
Subject: [PATCH] fix cross compilation on i586 targets
@@ -10,37 +10,26 @@ regenerate configure, similar fix is applied there.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
js/src/configure | 2 +-
js/src/configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/js/src/configure b/js/src/configure
index d019b0fdba44233596541de94307010d85a8e32e..5aa40f757a3dbb7d6887175046f44212c15c2eac 100755
--- a/js/src/configure
+++ b/js/src/configure
@@ -5555,7 +5555,7 @@ TARGET_MD_ARCH=unix
Rebase to 52.8.1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
js/src/old-configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/old-configure b/js/src/old-configure
index 8a8ef52..d7afcff 100644
--- a/js/src/old-configure
+++ b/js/src/old-configure
@@ -3964,7 +3964,7 @@ IMPORT_LIB_SUFFIX=
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin"
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
diff --git a/js/src/configure.in b/js/src/configure.in
index 0673aca12f6d83035549ade2a4a83906bf91f0f0..39b22724f9535ac1a6dba04658c91e4ef667fc47 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -919,7 +919,7 @@ TARGET_MD_ARCH=unix
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
--
2.5.0
2.7.4
@@ -1,112 +0,0 @@
From 1d1fa95c8ff7697e46343385a79a8f7e5c514a87 Mon Sep 17 00:00:00 2001
From: Zheng Xu <zheng.xu@linaro.org>
Date: Fri, 2 Sep 2016 17:40:05 +0800
Subject: [PATCH] Bug 1143022 - Manually mmap on arm64 to ensure high 17 bits
are clear. r=ehoogeveen
There might be 48-bit VA on arm64 depending on kernel configuration.
Manually mmap heap memory to align with the assumption made by JS engine.
Change-Id: Ic5d2b2fe4b758b3c87cc0688348af7e71a991146
Upstream-status: Backport
---
js/src/gc/Memory.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 2 deletions(-)
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index e5ad018..4149adf 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -309,6 +309,75 @@ InitMemorySubsystem()
#endif
}
+static inline void *
+MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
+{
+#if defined(__ia64__)
+ /*
+ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
+ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
+ * or the nearest available memory above that address, providing a near-guarantee
+ * that those bits are clear. If they are not, we return NULL below to indicate
+ * out-of-memory.
+ *
+ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
+ * address space.
+ *
+ * See Bug 589735 for more information.
+ */
+ void *region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
+ if (region == MAP_FAILED)
+ return MAP_FAILED;
+ /*
+ * If the allocated memory doesn't have its upper 17 bits clear, consider it
+ * as out of memory.
+ */
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ JS_ALWAYS_TRUE(0 == munmap(region, length));
+ return MAP_FAILED;
+ }
+ return region;
+#elif defined(__aarch64__)
+ /*
+ * There might be similar virtual address issue on arm64 which depends on
+ * hardware and kernel configurations. But the work around is slightly
+ * different due to the different mmap behavior.
+ *
+ * TODO: Merge with the above code block if this implementation works for
+ * ia64 and sparc64.
+ */
+ const uintptr_t start = UINT64_C(0x0000070000000000);
+ const uintptr_t end = UINT64_C(0x0000800000000000);
+ const uintptr_t step = ChunkSize;
+ /*
+ * Optimization options if there are too many retries in practice:
+ * 1. Examine /proc/self/maps to find an available address. This file is
+ * not always available, however. In addition, even if we examine
+ * /proc/self/maps, we may still need to retry several times due to
+ * racing with other threads.
+ * 2. Use a global/static variable with lock to track the addresses we have
+ * allocated or tried.
+ */
+ uintptr_t hint;
+ void* region = MAP_FAILED;
+ for (hint = start; region == MAP_FAILED && hint + length <= end; hint += step) {
+ region = mmap((void*)hint, length, prot, flags, fd, offset);
+ if (region != MAP_FAILED) {
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ if (munmap(region, length)) {
+ MOZ_ASSERT(errno == ENOMEM);
+ }
+ region = MAP_FAILED;
+ }
+ }
+ }
+ return region == MAP_FAILED ? NULL : region;
+#else
+ return mmap(NULL, length, prot, flags, fd, offset);
+#endif
+}
+
void *
MapAlignedPages(size_t size, size_t alignment)
{
@@ -322,12 +391,12 @@ MapAlignedPages(size_t size, size_t alignment)
/* Special case: If we want page alignment, no further work is needed. */
if (alignment == PageSize) {
- return mmap(NULL, size, prot, flags, -1, 0);
+ return MapMemory(size, prot, flags, -1, 0);
}
/* Overallocate and unmap the region's edges. */
size_t reqSize = Min(size + 2 * alignment, 2 * size);
- void *region = mmap(NULL, reqSize, prot, flags, -1, 0);
+ void *region = MapMemory(reqSize, prot, flags, -1, 0);
if (region == MAP_FAILED)
return NULL;
File diff suppressed because it is too large Load Diff
@@ -1,175 +0,0 @@
From 1c3f6dd9bb478fea0622e8a9ba2efbf19d73e302 Mon Sep 17 00:00:00 2001
From: Alistair Francis <alistair.francis@wdc.com>
Date: Fri, 1 Jun 2018 14:46:47 -0700
Subject: [PATCH] Update the double conversion update script
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
.../add-mfbt-api-markers.patch | 94 -------------------
.../more-architectures.patch | 30 ------
mfbt/double-conversion/update.sh | 8 +-
3 files changed, 3 insertions(+), 129 deletions(-)
delete mode 100644 mfbt/double-conversion/add-mfbt-api-markers.patch
delete mode 100644 mfbt/double-conversion/more-architectures.patch
diff --git a/mfbt/double-conversion/add-mfbt-api-markers.patch b/mfbt/double-conversion/add-mfbt-api-markers.patch
deleted file mode 100644
index b98ec74..0000000
--- a/mfbt/double-conversion/add-mfbt-api-markers.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
-index f98edae..e536a01 100644
---- a/mfbt/double-conversion/double-conversion.h
-+++ b/mfbt/double-conversion/double-conversion.h
-@@ -28,6 +28,7 @@
- #ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
- #define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
-
-+#include "mozilla/Types.h"
- #include "utils.h"
-
- namespace double_conversion {
-@@ -129,7 +130,7 @@ class DoubleToStringConverter {
- }
-
- // Returns a converter following the EcmaScript specification.
-- static const DoubleToStringConverter& EcmaScriptConverter();
-+ static MFBT_API(const DoubleToStringConverter&) EcmaScriptConverter();
-
- // Computes the shortest string of digits that correctly represent the input
- // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
-@@ -197,7 +198,7 @@ class DoubleToStringConverter {
- // The last two conditions imply that the result will never contain more than
- // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
- // (one additional character for the sign, and one for the decimal point).
-- bool ToFixed(double value,
-+ MFBT_API(bool) ToFixed(double value,
- int requested_digits,
- StringBuilder* result_builder) const;
-
-@@ -229,7 +230,7 @@ class DoubleToStringConverter {
- // kMaxExponentialDigits + 8 characters (the sign, the digit before the
- // decimal point, the decimal point, the exponent character, the
- // exponent's sign, and at most 3 exponent digits).
-- bool ToExponential(double value,
-+ MFBT_API(bool) ToExponential(double value,
- int requested_digits,
- StringBuilder* result_builder) const;
-
-@@ -267,7 +268,7 @@ class DoubleToStringConverter {
- // The last condition implies that the result will never contain more than
- // kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
- // exponent character, the exponent's sign, and at most 3 exponent digits).
-- bool ToPrecision(double value,
-+ MFBT_API(bool) ToPrecision(double value,
- int precision,
- StringBuilder* result_builder) const;
-
-@@ -292,7 +293,7 @@ class DoubleToStringConverter {
- // kBase10MaximalLength.
- // Note that DoubleToAscii null-terminates its input. So the given buffer
- // should be at least kBase10MaximalLength + 1 characters long.
-- static const int kBase10MaximalLength = 17;
-+ static const MFBT_DATA(int) kBase10MaximalLength = 17;
-
- // Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
- // -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
-@@ -332,7 +333,7 @@ class DoubleToStringConverter {
- // terminating null-character when computing the maximal output size.
- // The given length is only used in debug mode to ensure the buffer is big
- // enough.
-- static void DoubleToAscii(double v,
-+ static MFBT_API(void) DoubleToAscii(double v,
- DtoaMode mode,
- int requested_digits,
- char* buffer,
-@@ -343,7 +344,7 @@ class DoubleToStringConverter {
-
- private:
- // Implementation for ToShortest and ToShortestSingle.
-- bool ToShortestIeeeNumber(double value,
-+ MFBT_API(bool) ToShortestIeeeNumber(double value,
- StringBuilder* result_builder,
- DtoaMode mode) const;
-
-@@ -351,15 +352,15 @@ class DoubleToStringConverter {
- // corresponding string using the configured infinity/nan-symbol.
- // If either of them is NULL or the value is not special then the
- // function returns false.
-- bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
-+ MFBT_API(bool) HandleSpecialValues(double value, StringBuilder* result_builder) const;
- // Constructs an exponential representation (i.e. 1.234e56).
- // The given exponent assumes a decimal point after the first decimal digit.
-- void CreateExponentialRepresentation(const char* decimal_digits,
-+ MFBT_API(void) CreateExponentialRepresentation(const char* decimal_digits,
- int length,
- int exponent,
- StringBuilder* result_builder) const;
- // Creates a decimal representation (i.e 1234.5678).
-- void CreateDecimalRepresentation(const char* decimal_digits,
-+ MFBT_API(void) CreateDecimalRepresentation(const char* decimal_digits,
- int length,
- int decimal_point,
- int digits_after_point,
diff --git a/mfbt/double-conversion/more-architectures.patch b/mfbt/double-conversion/more-architectures.patch
deleted file mode 100644
index b8d3804..0000000
--- a/mfbt/double-conversion/more-architectures.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
---- a/mfbt/double-conversion/utils.h
-+++ b/mfbt/double-conversion/utils.h
-@@ -48,20 +48,24 @@
- // An easy way to test if the floating-point operations are correct is to
- // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then
- // the result is equal to 89255e-22.
- // The best way to test this, is to create a division-function and to compare
- // the output of the division with the expected result. (Inlining must be
- // disabled.)
- // On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
- #if defined(_M_X64) || defined(__x86_64__) || \
-- defined(__ARMEL__) || \
-+ defined(__ARMEL__) || defined(__avr32__) || \
-+ defined(__hppa__) || defined(__ia64__) || \
-+ defined(__mips__) || defined(__powerpc__) || \
-+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
-+ defined(__SH4__) || defined(__alpha__) || \
- defined(_MIPS_ARCH_MIPS32R2)
- #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
--#elif defined(_M_IX86) || defined(__i386__)
-+#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
- #if defined(_WIN32)
- // Windows uses a 64bit wide floating point stack.
- #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
- #else
- #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
- #endif // _WIN32
- #else
- #error Target architecture was not detected as supported by Double-Conversion.
diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh
index 81add8e..9ef2e91 100755
--- a/mfbt/double-conversion/update.sh
+++ b/mfbt/double-conversion/update.sh
@@ -4,14 +4,12 @@
# double-conversion source that we need.
cp $1/LICENSE ./
-cp $1/README ./
+cp $1/COPYING ./
# Includes
-cp $1/src/*.h ./
+cp $1/double-conversion/*.h ./
# Source
-cp $1/src/*.cc ./
+cp $1/double-conversion/*.cc ./
-patch -p3 < add-mfbt-api-markers.patch
patch -p3 < use-StandardInteger.patch
-patch -p3 < more-architectures.patch
--
2.17.0
@@ -1,18 +0,0 @@
fix the compile error of powerpc64
Upstream-status: Accepted
fix the following error
|error: 'jsuword' does not name a type
--- a/js/src/jsval.hold 2015-04-24 01:15:06.692970731 -0500
+++ b/js/src/jsval.h 2015-04-24 01:15:41.792969478 -0500
@@ -304,7 +304,6 @@
int32_t i32;
uint32_t u32;
JSWhyMagic why;
- jsuword word;
} payload;
} s;
double asDouble;
@@ -1,20 +0,0 @@
fix the compile error do to perl update
Upstream-status: Inappropriate
Signed-of-by: Armin Kuster <akuster808@gmail.com>
Index: src/config/milestone.pl
===================================================================
--- src.orig/config/milestone.pl
+++ src/config/milestone.pl
@@ -55,7 +55,7 @@ $MILESTONE_FILE = "$TOPSRCDIR/config/mi
#
my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
-if (defined(@TEMPLATE_FILE)) {
+if (@TEMPLATE_FILE) {
my $TFILE;
foreach $TFILE (@TEMPLATE_FILE) {
@@ -1,83 +0,0 @@
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "http://www.mozilla.org/js/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \
file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \
file://0005-aarch64-64k-page.patch;patchdir=../../ \
file://0001-regenerate-configure.patch;patchdir=../../ \
file://fix-the-compile-error-of-powerpc64.patch;patchdir=../../ \
file://fix_milestone_compile_issue.patch \
file://0010-fix-cross-compilation-on-i586-targets.patch;patchdir=../../ \
file://Manually_mmap_heap_memory_esr17.patch;patchdir=../../ \
file://0001-compare-the-first-character-of-string-to-be-null-or-.patch;patchdir=../../ \
file://Update-the-double-conversion-update-script.patch;patchdir=../../ \
file://Update-Double-Conversion.patch;patchdir=../../ \
"
SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"
S = "${WORKDIR}/${BPN}${PV}/js/src"
inherit autotools pkgconfig perlnative pythonnative
DEPENDS += "nspr zlib"
# Host specific flags need to be defined, otherwise target flags will be passed to the host
export HOST_CFLAGS = "${BUILD_CFLAGS}"
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \
--host=${BUILD_SYS} \
--build=${BUILD_SYS} \
--prefix=${prefix} \
--libdir=${libdir} \
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
--enable-threadsafe \
--disable-static \
"
EXTRA_OECONF_append_armv4 = " \
--disable-methodjit \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
# mozjs requires autoreconf 2.13
do_configure() {
export HOST_CFLAGS="${BUILD_CFLAGS}"
export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
( cd ${S}
gnu-configize --force
mv config.guess config.sub build/autoconf )
${S}/configure ${EXTRA_OECONF}
}
# patch.bbclass will try to apply the patches already present and fail, so clean them out
do_unpack() {
tar -xvf ${DL_DIR}/mozjs17.0.0.tar.gz -C ${WORKDIR}/
rm -rf ${WORKDIR}/${BPN}${PV}/patches
}
PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js17-config"
# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
ARM_INSTRUCTION_SET = "arm"
@@ -0,0 +1,95 @@
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.8.1.orig.tar.bz2 \
file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
file://0010-fix-cross-compilation-on-i586-targets.patch \
file://0001-do-not-create-python-environment.patch \
file://0002-fix-cannot-find-link.patch \
file://0003-workaround-autoconf-2.13-detection-failed.patch \
file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \
file://0005-fix-do_compile-failed-on-mips.patch \
"
SRC_URI_append_libc-musl = " \
file://0006-support-musl.patch \
"
SRC_URI[md5sum] = "3a44c2fd3d7b5a370ed9184163c74bc4"
SRC_URI[sha256sum] = "fb5e11b7f31a33be820d5c947c5fa114751b0d5033778c1cd8e0cf2dad91e8fa"
inherit autotools pkgconfig perlnative pythonnative
DEPENDS += "nspr zlib"
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \
--host=${BUILD_SYS} \
--prefix=${prefix} \
--libdir=${libdir} \
--disable-tests \
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},,virtual/libx11"
EXTRA_OEMAKE_task-compile += "OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'"
EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static"
do_configure() {
export SHELL="/bin/sh"
${S}/js/src/configure ${EXTRA_OECONF}
}
do_compile_prepend() {
export SHELL="/bin/sh"
export S
export PYTHONPATH
cd ${S}
for sub_dir in python testing/mozbase; do
for module_dir in `ls $sub_dir -1`;do
[ $module_dir = "virtualenv" ] && continue
if [ -d "${S}/$sub_dir/$module_dir" ];then
PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
fi
done
done
PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
cd -
}
do_install_prepend() {
export SHELL="/bin/sh"
export S
export PYTHONPATH
cd ${S}
for sub_dir in python testing/mozbase; do
for module_dir in `ls $sub_dir -1`;do
[ $module_dir = "virtualenv" ] && continue
if [ -d "${S}/$sub_dir/$module_dir" ];then
PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
fi
done
done
PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
cd -
}
PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js52-config"
# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
ARM_INSTRUCTION_SET_armv5 = "arm"
ARM_INSTRUCTION_SET_armv4 = "arm"
DISABLE_STATIC = ""