package/spidermonkey185: new package
PATCH v4 1/1 package/spidermonkey185: new package
From: Nicolas Cavallari <[email protected]>
This is the old 1.8.5 branch of spidermonkey, used in Firefox 4. It is rather unmaintained, but some software still depend on it, such as couchdb.
Bernd: Updated the patch by Nicolas
- rebased
- added myself to DEVELOPERS
- updated patches to solve build problems found by test-pkg
- patches 1-10 were taken from Fedora:
https://src.fedoraproject.org/rpms/js/tree/f26
- patches 11 & 13 are from Nicolas original patch series
- patch 12 was added to fix armv5 support
- HOST_CFLAGS was added to fix configure errors detected by test-pkg:
- br-arcle-hs38:
gcc: error: unrecognized command line option '-matomic';
did you mean '-mbionic'?
- br-xtensa-full:
gcc: error: unrecognized command line option '-mlongcalls'
gcc: error: unrecognized command line option '-mauto-litpools'
- powerpc-ctng_e500v2-linux-gnuspe:
gcc: error: unrecognized argument in option '-mabi=spe'
gcc: note: valid arguments to '-mabi=' are: ms sysv
gcc: error: unrecognized command line option '-mfloat-gprs=double';
did you mean '-ffloat-store'?
- JIT support was disabled for BR2_ARM_CPU_ARMV4 to fix:
{standard input}:35: Error: selected processor does not support ARM mode blx SetVMFrameRegs' {standard input}:37: Error: selected processor does not support ARM mode blx PushActiveVMFrame' {standard input}:46: Error: selected processor does not support ARM mode blx PopActiveVMFrame' {standard input}:55: Error: selected processor does not support ARM mode blx js_InternalThrow' {standard input}:60: Error: selected processor does not support ARM mode blx PopActiveVMFrame' {standard input}:69: Error: selected processor does not support ARM mode blx ip' config/rules.mk:1475: recipe for target 'MethodJIT.o' failed
- test-pkg also detected build errors on powerpc and x86_64:
jsapi.cpp: In function ?JSBool JS_ConvertArgumentsVA(JSContext*, uintN, jsval*, const char*, __va_list_tag*)?:
jsapi.cpp:361:63: 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])?
JS_ADDRESSOF_VA_LIST(ap))) {which were fixed by ac_cv_va_val_copy=no
This package now passes test-pkg on the next branch with this defconfig BR2_PACKAGE_SPIDERMONKEY185=y
armv5-ctng-linux-gnueabi [ 1/47]: OK
armv7-ctng-linux-gnueabihf [ 2/47]: OK
br-aarch64-glibc [ 3/47]: OK
br-arcle-hs38 [ 4/47]: OK
br-arm-basic [ 5/47]: SKIPPED
br-arm-cortex-a9-glibc [ 6/47]: OK
br-arm-cortex-a9-musl [ 7/47]: OK
br-arm-cortex-m4-full [ 8/47]: SKIPPED
br-arm-full [ 9/47]: OK
br-arm-full-nothread [10/47]: SKIPPED
br-arm-full-static [11/47]: SKIPPED
br-bfin-full [12/47]: SKIPPED
br-i386-pentium4-full [13/47]: OK
br-i386-pentium-mmx-musl [14/47]: OK
br-m68k-5208-full [15/47]: SKIPPED
br-m68k-68040-full [16/47]: SKIPPED
br-microblazeel-full [17/47]: SKIPPED
br-mips32r6-el-hf-glibc [18/47]: OK
br-mips64-n64-full [19/47]: OK
br-mips64r6-el-hf-glibc [20/47]: OK
br-mipsel-o32-full [21/47]: OK
br-nios2-glibc [22/47]: OK
br-openrisc-uclibc [23/47]: SKIPPED
br-powerpc-603e-basic-cpp [24/47]: OK
br-powerpc64le-power8-glibc [25/47]: OK
br-powerpc64-power7-glibc [26/47]: OK
br-powerpc-e500mc-full [27/47]: OK
br-sh4-full [28/47]: OK
br-sparc64-glibc [29/47]: OK
br-sparc-uclibc [30/47]: OK
br-x86-64-core2-full [31/47]: OK
br-x86-64-musl [32/47]: OK
br-xtensa-full [33/47]: OK
i686-ctng-linux-gnu [34/47]: OK
linaro-aarch64 [35/47]: OK
linaro-arm [36/47]: OK
mips64el-ctng_n32-linux-gnu [37/47]: OK
mips64el-ctng_n64-linux-gnu [38/47]: OK
powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK
sourcery-arm-armv4t [40/47]: OK
sourcery-arm [41/47]: OK
sourcery-arm-thumb2 [42/47]: OK
sourcery-mips64 [43/47]: OK
sourcery-mips [44/47]: OK
sourcery-nios2 [45/47]: OK
sourcery-x86-64 [46/47]: OK
x86_64-ctng_locales-linux-gnu [47/47]: OK47 builds, 9 skipped, 0 build failed, 0 legal-info failed
---
v4: rebased and major patch overhaul
v3: Addressed Maxime Hadjinlian's comments
v2:
* Moved package to Libraries/Other
* Tried to make the package reconfigurable, but stopped when the patch grew even larger than previous patches. Instead, simplified the patch to not force a specific arm version, to make the configure patch smaller.
* Added patches to fix DESTDIR being embedded in the symlink and remove the leftover nspr dependency.
* Added comment on why we define symbols for the host compiler.
* Added upstream patches to fix problems on various architectures, taking inspiration for the patches that Debian uses.
* Disabled the JIT on sparc64 because that does not compile.
* Added host-perl and host-python, because they are used to build.
* Changed license as per Arnout suggestion
DEVELOPERS | 1 + package/Config.in | 1 + .../spidermonkey185/0001-64bit-big-endian.patch | 21 +++ package/spidermonkey185/0002-secondary-jit.patch | 22 +++ package/spidermonkey185/0003-destdir.patch | 24 ++++ package/spidermonkey185/0004-537701.patch | 47 +++++++ package/spidermonkey185/0005-arm-nosoftfp.patch | 41 ++++++ package/spidermonkey185/0006-aarch64.patch | 61 +++++++++ package/spidermonkey185/0007-ppc64le.patch | 56 ++++++++ package/spidermonkey185/0008-array-recursion.patch | 115 ++++++++++++++++ package/spidermonkey185/0009-c++11.patch | 152 +++++++++++++++++++++ package/spidermonkey185/0010-tag.patch | 107 +++++++++++++++ ...11-remove-unused-pkgconfg-nspr-dependency.patch | 19 +++ package/spidermonkey185/0012-arm5tej.patch | 24 ++++ ...heFlush-support-error-on-exotic-platforms.patch | 36 +++++ package/spidermonkey185/Config.in | 16 +++ package/spidermonkey185/spidermonkey185.hash | 2 + package/spidermonkey185/spidermonkey185.mk | 36 +++++ 18 files changed, 781 insertions(+) create mode 100644 package/spidermonkey185/0001-64bit-big-endian.patch create mode 100644 package/spidermonkey185/0002-secondary-jit.patch create mode 100644 package/spidermonkey185/0003-destdir.patch create mode 100644 package/spidermonkey185/0004-537701.patch create mode 100644 package/spidermonkey185/0005-arm-nosoftfp.patch create mode 100644 package/spidermonkey185/0006-aarch64.patch create mode 100644 package/spidermonkey185/0007-ppc64le.patch create mode 100644 package/spidermonkey185/0008-array-recursion.patch create mode 100644 package/spidermonkey185/0009-c++11.patch create mode 100644 package/spidermonkey185/0010-tag.patch create mode 100644 package/spidermonkey185/0011-remove-unused-pkgconfg-nspr-dependency.patch create mode 100644 package/spidermonkey185/0012-arm5tej.patch create mode 100644 package/spidermonkey185/0013-Avoid-missing-cacheFlush-support-error-on-exotic-platforms.patch create mode 100644 package/spidermonkey185/Config.in create mode 100644 package/spidermonkey185/spidermonkey185.hash create mode 100644 package/spidermonkey185/spidermonkey185.mk
DEVELOPERS +1 -0
@@ -300,6 +300,7 @@ F: package/python-pylru/ F: package/python-slob/ F: package/rtmpdump/ F: package/softether/ +F: package/spidermonkey185/ F: package/taglib/ F: package/tinyxml2/ F: package/tor/
package/Config.in +1 -0
@@ -1482,6 +1482,7 @@ endif source "package/shapelib/Config.in" source "package/skalibs/Config.in" source "package/sphinxbase/Config.in" + source "package/spidermonkey185/Config.in" source "package/startup-notification/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in"
package/spidermonkey185/0001-64bit-big-endian.patch new file +21 -0
@@ -0,0 +1,21 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627664 + +Source: +https://src.fedoraproject.org/rpms/js/blob/f26/f/js-1.8.5-64bit-big-endian.patch + +Patch position #1: +https://src.fedoraproject.org/rpms/js/blob/master/f/js.spec#_12 + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h +--- js-1.8.5/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 ++++ js-1.8.5/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 +@@ -347,6 +347,7 @@ typedef union jsval_layout + int32 i32; + uint32 u32; + JSWhyMagic why; ++ jsuword word; + } payload; + } s; + double asDouble;
package/spidermonkey185/0002-secondary-jit.patch new file +22 -0
@@ -0,0 +1,22 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627668 + +Source: +https://src.fedoraproject.org/rpms/js/blob/f26/f/js-1.8.5-secondary-jit.patch + +Patch position #2: +https://src.fedoraproject.org/rpms/js/blob/master/f/js.spec#_13 + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in +--- js-1.8.5/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 ++++ js-1.8.5/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 +@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU))) ++ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) + + VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \
package/spidermonkey185/0003-destdir.patch new file +24 -0
@@ -0,0 +1,24 @@ +Source: +https://src.fedoraproject.org/rpms/js/blob/f26/f/js185-destdir.patch + +Patch position #3: +https://src.fedoraproject.org/rpms/js/blob/master/f/js.spec#_14 + +Signed-off-by: Bernd Kuhls <[email protected]> + +# See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=628723 +# Patch created by Colin Walters <[email protected]> + +--- a/js/src/Makefile.in.orig 2011-06-15 19:40:27.447770306 -0400 ++++ b/js/src/Makefile.in 2011-06-15 19:40:57.013770299 -0400 +@@ -888,8 +888,8 @@ + ifeq (,$(HOST_BIN_SUFFIX)) + mv -f $(SHLIB_ANY_VER) $(SHLIB_EXACT_VER) + @[ ! -h $(SHLIB_ABI_VER) ] || rm -f $(SHLIB_ABI_VER) +- ln -s $(SHLIB_EXACT_VER) $(SHLIB_ABI_VER) +- ln -s $(SHLIB_ABI_VER) $(SHLIB_ANY_VER) ++ ln -s $(notdir $(SHLIB_EXACT_VER)) $(SHLIB_ABI_VER) ++ ln -s $(notdir $(SHLIB_ABI_VER)) $(SHLIB_ANY_VER) + endif + endif + ifneq (,$(IMPORT_LIBRARY))
package/spidermonkey185/0004-537701.patch new file +47 -0
47 lines not on this page · raw message
package/spidermonkey185/0005-arm-nosoftfp.patch new file +41 -0
41 lines not on this page · raw message
package/spidermonkey185/0006-aarch64.patch new file +61 -0
61 lines not on this page · raw message
package/spidermonkey185/0007-ppc64le.patch new file +56 -0
56 lines not on this page · raw message
package/spidermonkey185/0008-array-recursion.patch new file +115 -0
115 lines not on this page · raw message
package/spidermonkey185/0009-c++11.patch new file +152 -0
152 lines not on this page · raw message
package/spidermonkey185/0010-tag.patch new file +107 -0
107 lines not on this page · raw message
package/spidermonkey185/0011-remove-unused-pkgconfg-nspr-dependency.patch new file +19 -0
@@ -0,0 +1,19 @@ +From: Nicolas Cavallari <[email protected]> + +Remove the dependency on nspr. + +This dependency was removed when spidermonkey was extracted from the +mozilla code base. This is probably a left-over, since it is not used. + +Signed-off-by: Nicolas Cavallari <[email protected]> +Signed-off-by: Bernd Kuhls <[email protected]> + +--- spidermonkey185-1.0.0/js/src/mozjs185.pc.in 2016-05-23 13:41:28.430466213 +0200 ++++ spidermonkey185-1.0.0/js/src/mozjs185.pc.in 2016-05-23 13:42:00.727558977 +0200 +@@ -5,6 +5,5 @@ + Name: SpiderMonkey 1.8.5 + Description: The Mozilla library for JavaScript 1.8.5 + Version: %MOZILLA_VERSION% +-Requires: nspr >= 4.7 + Libs: -L${libdir} -lmozjs185 + Cflags: -I${includedir}/js
package/spidermonkey185/0012-arm5tej.patch new file +24 -0
@@ -0,0 +1,24 @@ +Fix support for armv5 + +Fixes build error with BR2_GCC_TARGET_CPU="arm926ej-s" because +spidermonkey does not recognize __ARM_ARCH_5TEJ__: + +./nanojit/njconfig.cpp:103:18: + error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive] + arm_arch = NJ_COMPILER_ARM_ARCH; + +Signed-off-by: Bernd Kuhls <[email protected]> + +diff -uNr js-1.8.5.org/js/src/nanojit/njcpudetect.h js-1.8.5/js/src/nanojit/njcpudetect.h +--- js-1.8.5.org/js/src/nanojit/njcpudetect.h 2011-03-31 21:08:36.000000000 +0200 ++++ js-1.8.5/js/src/nanojit/njcpudetect.h 2017-08-05 16:01:35.444779038 +0200 +@@ -87,7 +87,8 @@ + #elif defined(__ARM_ARCH_5__) || \ + defined(__ARM_ARCH_5T__) || \ + defined(__ARM_ARCH_5E__) || \ +- defined(__ARM_ARCH_5TE__) ++ defined(__ARM_ARCH_5TE__) || \ ++ defined(__ARM_ARCH_5TEJ__) + + #define NJ_COMPILER_ARM_ARCH 5 +
package/spidermonkey185/0013-Avoid-missing-cacheFlush-support-error-on-exotic-platforms.patch new file +36 -0
@@ -0,0 +1,36 @@ + +# HG changeset patch +# User Mike Hommey <[email protected]> +# Date 1303461188 -7200 +# Node ID 59771590e9203d48ef8cbcd7eaf2f8ae45dbb1c1 +# Parent c4b82ec27d6d6e1c02ef0abb3b6e805bfdd092ec +Bug 638056 - Avoid "The cacheFlush support is missing on this platform" error on exotic platforms. r=cdleary + +[nicolas.cavallari at green-communications.fr: refresh patch] +Signed-off-by: Nicolas Cavallari <[email protected]> +[Bernd: rebased against Fedora patch series] +Signed-off-by: Bernd Kuhls <[email protected]> + +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -377,17 +377,17 @@ CPPSRCS += checks.cc \ + platform.cc \ + utils.cc \ + $(NONE) + + # + # END enclude sources for V8 dtoa + ############################################# + +-ifeq (,$(filter-out aarch64 powerpc powerpc64 powerpc64le sparc sparc64 s390 s390x,$(TARGET_CPU))) ++ifeq (,$(filter arm %86 x86_64,$(TARGET_CPU))) + + VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ + $(srcdir)/yarr/pcre \ + $(NULL) + + CPPSRCS += pcre_compile.cpp \ + pcre_exec.cpp \ +
package/spidermonkey185/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_SPIDERMONKEY185 + bool "spidermonkey (1.8.5)" + depends on BR2_USE_MMU # fork in executable tools. + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np() + help + SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is + used in various Mozilla products, including Firefox. + + This is the old 1.8.5 branch, used in Firefox 4. + +comment "Spider monkey (1.8.5) need a toolchain with C++, dynamic library, NPTL" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/spidermonkey185/spidermonkey185.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally generated. +sha256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 js185-1.0.0.tar.gz
package/spidermonkey185/spidermonkey185.mk new file +36 -0
@@ -0,0 +1,36 @@ +################################################################################ +# +# Spidermonkey (1.8.5) +# +################################################################################ + +SPIDERMONKEY185_VERSION = 1.0.0 +SPIDERMONKEY185_SITE = http://ftp.mozilla.org/pub/js +SPIDERMONKEY185_SOURCE = js185-$(SPIDERMONKEY185_VERSION).tar.gz +SPIDERMONKEY185_SUBDIR = js/src +SPIDERMONKEY185_LICENSE = MPL-1.1 or GPL-2.0+ or LGPL-2.1+ +SPIDERMONKEY185_INSTALL_STAGING = YES +SPIDERMONKEY185_DEPENDENCIES = host-python host-perl + +# To detect endianess a host binary is built from jscpucfg.cpp which is +# not cross-compile friendly, so we force endianess. +# HOST_CFLAGS are forced to avoid problems when detecting host gcc +# because configure would pass TARGET_CFLAGS to the host gcc. +SPIDERMONKEY185_CONF_ENV = \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_CXXFLAGS="$(HOST_CXXFLAGS) -DFORCE_$(BR2_ENDIAN)_ENDIAN" \ + $(if $(BR2_powerpc)$(BR2_x86_64),ac_cv_va_val_copy=no) + +# Mozilla mixes up target, host and build. See the comment in configure.in +# around line 360. Also, nanojit fails to build on sparc64 with +# #error "unknown nanojit architecture", so disable the JIT. +# Disable JIT for armv4 because this CPU does not support the asm code +# used in spidermonkey. +SPIDERMONKEY185_CONF_OPTS = \ + --target=$(GNU_TARGET_NAME) \ + --build=$(GNU_TARGET_NAME) \ + --host=$(GNU_HOST_NAME) \ + $(if $(BR2_ARM_CPU_ARMV4),--disable-methodjit) \ + $(if $(BR2_sparc64),--disable-tracejit) + +$(eval $(autotools-package))
Signature · 1 line
2.11.0
PATCH v4 1/1 package/spidermonkey185: new package
Hello,
+Nicolas in Cc.
I'm still not really thrilled by the idea of adding a package for such a large piece of code that Mozilla says is outdated
(https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/1.8.5).
Is it still just CouchDB that needs this? Do they have some plans of using something more maintained ?
Quoted 10 lines · Bernd Kuhls
create mode 100644 package/spidermonkey185/0001-64bit-big-endian.patch create mode 100644 package/spidermonkey185/0002-secondary-jit.patch create mode 100644 package/spidermonkey185/0003-destdir.patch create mode 100644 package/spidermonkey185/0004-537701.patch create mode 100644 package/spidermonkey185/0005-arm-nosoftfp.patch create mode 100644 package/spidermonkey185/0006-aarch64.patch create mode 100644 package/spidermonkey185/0007-ppc64le.patch create mode 100644 package/spidermonkey185/0008-array-recursion.patch create mode 100644 package/spidermonkey185/0009-c++11.patch create mode 100644 package/spidermonkey185/0010-tag.patch
Most of those patches don't have any useful description. Could you add such a description inside the patches ?
Quoted 14 lines
package/spidermonkey185/0001-64bit-big-endian.patch new file +8
-0@@ -0,0 +1,21 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627664 + +Source: +https://src.fedoraproject.org/rpms/js/blob/f26/f/js-1.8.5-64bit-big-endian.patch + +Patch position #1: +https://src.fedoraproject.org/rpms/js/blob/master/f/js.spec#_12 +
package/spidermonkey185/0001-64bit-big-endian.patch line 18
Quoted 10 lines
package/spidermonkey185/0001-64bit-big-endian.patch new file +10
-0+Signed-off-by: Bernd Kuhls <[email protected]> + +diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h +--- js-1.8.5/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 ++++ js-1.8.5/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 +@@ -347,6 +347,7 @@ typedef union jsval_layout + int32 i32; + uint32 u32; + JSWhyMagic why; ++ jsuword word;
This change is later reverted by patch 0004.
package/spidermonkey185/0001-64bit-big-endian.patch
Quoted 9 lines
package/spidermonkey185/0001-64bit-big-endian.patch new file +9
-0+diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in +--- js-1.8.5/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 ++++ js-1.8.5/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 +@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU))) ++ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU)))
This change is later modified again in patch 0013, to go in a different direction (use filter instead of filter-out to opt-in supported architectures instead of opt-out unsupported architectures).
Quoted 2 lines
+-ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) ++ifeq (,$(filter-out aarch64 powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU)))
Another change modified later.
Quoted 2 lines
+-ifeq (,$(filter-out aarch64 powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) ++ifeq (,$(filter-out aarch64 powerpc powerpc64 powerpc64le sparc sparc64 s390 s390x,$(TARGET_CPU)))
Ditto.
package/spidermonkey185/Config.in line 2
Quoted 8 lines
package/spidermonkey185/Config.in new file +2
-0@@ -0,0 +1,16 @@ +config BR2_PACKAGE_SPIDERMONKEY185 + bool "spidermonkey (1.8.5)"
spidermonkey-185 ? Perhaps use that as the name for the package ?
Quoted 21 lines
package/spidermonkey185/Config.in new file +14
-0+ depends on BR2_USE_MMU # fork in executable tools. + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np() + help + SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is + used in various Mozilla products, including Firefox. + + This is the old 1.8.5 branch, used in Firefox 4. + +comment "Spider monkey (1.8.5) need a toolchain with C++, dynamic library, NPTL" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTLpackage/spidermonkey185/spidermonkey185.mk new file +0
-0
package/spidermonkey185/spidermonkey185.mk line 3
Quoted 3 lines
package/spidermonkey185/spidermonkey185.mk new file +3
-0@@ -0,0 +1,36 @@ +################################################################################ +# +# Spidermonkey (1.8.5)
spidermonkey185, or spidermonkey-185 if you change the package name.
package/spidermonkey185/spidermonkey185.mk line 11
Quoted 8 lines
package/spidermonkey185/spidermonkey185.mk new file +8
-0+# +################################################################################ + +SPIDERMONKEY185_VERSION = 1.0.0 +SPIDERMONKEY185_SITE = http://ftp.mozilla.org/pub/js +SPIDERMONKEY185_SOURCE = js185-$(SPIDERMONKEY185_VERSION).tar.gz +SPIDERMONKEY185_SUBDIR = js/src +SPIDERMONKEY185_LICENSE = MPL-1.1 or GPL-2.0+ or LGPL-2.1+
No license file available ?
package/spidermonkey185/spidermonkey185.mk line 21
Quoted 10 lines
package/spidermonkey185/spidermonkey185.mk new file +10
-0+SPIDERMONKEY185_INSTALL_STAGING = YES +SPIDERMONKEY185_DEPENDENCIES = host-python host-perl + +# To detect endianess a host binary is built from jscpucfg.cpp which is +# not cross-compile friendly, so we force endianess. +# HOST_CFLAGS are forced to avoid problems when detecting host gcc +# because configure would pass TARGET_CFLAGS to the host gcc. +SPIDERMONKEY185_CONF_ENV = \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_CXXFLAGS="$(HOST_CXXFLAGS) -DFORCE_$(BR2_ENDIAN)_ENDIAN" \
So you have to specify the endianness of the target in host flags?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v4 1/1 package/spidermonkey185: new package
Hi Thomas,
Am Wed, 23 Aug 2017 16:08:15 +0200 schrieb Thomas Petazzoni:
Quoted 3 lines
I'm still not really thrilled by the idea of adding a package for such a large piece of code that Mozilla says is outdated
(https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/
Releases/1.8.5).
Quoted 2 lines
Is it still just CouchDB that needs this? Do they have some plans of using something more maintained ?
besides CouchDB I know no other package needing spidermonkey185. Although upstream considers spidermonkey185 outdated many distros still package it:
https://packages.qa.debian.org/m/mozjs.html
https://launchpad.net/ubuntu/+source/mozjs
https://apps.fedoraproject.org/packages/js/
https://www.archlinux.org/packages/community/i686/js185/
https://packages.gentoo.org/packages/dev-lang/spidermonkey
Quoted 2 lines
Most of those patches don't have any useful description. Could you add such a description inside the patches ?
The patches were downloaded from Fedora because this patch set was needed to build CouchDB 2.1. The patch set provided by Nicolas for spidermonkey, which worked with CouchDB 1.6, is not enough for CouchDB 2.1 anymore. I can try to add some descriptions, but honestly, I have no idea what most of the patches do ;)
Quoted 1 line
This change is later reverted by patch 0004.
[...]
Quoted 3 lines
This change is later modified again in patch 0013, to go in a different direction (use filter instead of filter-out to opt-in supported architectures instead of opt-out unsupported architectures).
[...]
Quoted 1 line
Another change modified later.
[...]
Quoted 1 line
Ditto.
What about squashing the Fedora patches?
Quoted 1 line
spidermonkey-185 ? Perhaps use that as the name for the package ?
Ok, or we can use mozjs like Debian does.
Quoted 1 line
No license file available ?
What about js-1.8.5/js/src/README.html ?
Quoted 9 lines
package/spidermonkey185/spidermonkey185.mk line 21
Quoted 7 lines
+# To detect endianess a host binary is built from jscpucfg.cpp which is +# not cross-compile friendly, so we force endianess.
+#HOST_CFLAGSare forced to avoid problems when detecting host gcc +# because configure would passTARGET_CFLAGSto the host gcc.package/spidermonkey185/spidermonkey185.mk new file +3
-0+SPIDERMONKEY185_CONF_ENV = \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_CXXFLAGS="$(HOST_CXXFLAGS) -DFORCE_$(BR2_ENDIAN)_ENDIAN" \So you have to specify the endianness of the target in host flags?
Nicolas added this code but according to js-1.8.5/js/src/Makefile.in we could use $(CROSS_COMPILE) instead to avoid jscpucfg. I will have a look.
Regards, Bernd