about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2014-09-18 22:05:52 +0200
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2014-10-10 17:12:49 +0200
commit372b0cda528111caa9ee0a92afdd2cc92186fc9b (patch)
tree5d591d155544c9321f6be904ff0e5cfd32dd4d7e /pkgs/development/interpreters
parent82b6d7ff9a17e0b1f4c07c503de9e1c08d29f62a (diff)
downloadnixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar.gz
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar.bz2
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar.lz
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar.xz
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.tar.zst
nixlib-372b0cda528111caa9ee0a92afdd2cc92186fc9b.zip
Making spidermonkey_185 build on ARM, and so also polkit.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/spidermonkey/185-1.0.0.nix17
-rw-r--r--pkgs/development/interpreters/spidermonkey/findvanilla.patch19
2 files changed, 35 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix
index 6fc4bcb9dea8..47652966cec7 100644
--- a/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix
+++ b/pkgs/development/interpreters/spidermonkey/185-1.0.0.nix
@@ -20,7 +20,22 @@ stdenv.mkDerivation rec {
     export LIBXUL_DIST=$out
   '';
 
-  configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ];
+  # Explained below in configureFlags for ARM
+  patches = stdenv.lib.optionals stdenv.isARM [
+    ./findvanilla.patch
+  ];
+
+  patchFlags = "-p3";
+
+  # On the Sheevaplug, ARM, its nanojit thing segfaults in japi-tests in
+  # "make check". Disabling tracejit makes it work, but then it needs the
+  # patch findvanilla.patch do disable a checker about allocator safety. In case
+  # of polkit, which is what matters most, it does not override the allocator
+  # so the failure of that test does not matter much.
+  configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
+    stdenv.lib.optionals stdenv.isArm [
+        "--with-cpu-arch=armv5t" 
+        "--disable-tracejit" ];
 
   # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393
   preBuild = "touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}";
diff --git a/pkgs/development/interpreters/spidermonkey/findvanilla.patch b/pkgs/development/interpreters/spidermonkey/findvanilla.patch
new file mode 100644
index 000000000000..f6dab5497a0a
--- /dev/null
+++ b/pkgs/development/interpreters/spidermonkey/findvanilla.patch
@@ -0,0 +1,19 @@
+diff --git a/js/src/Makefile.in b/js/src/Makefile.in
+index a85e055..92ef441 100644
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -580,14 +580,6 @@ check-valgrind::
+ 	$(check-sync-dirs) $(srcdir)/build $(MOZ_SYNC_BUILD_FILES)/build
+ endif
+ 
+-# The "find any vanilla new/new[] calls" script is tailored to Linux, so
+-# only run it there.  That should be enough to catch any such calls that
+-# creep in.
+-ifeq ($(OS_ARCH),Linux)
+-check::
+-	$(srcdir)/config/find_vanilla_new_calls $(LIBRARY)
+-endif
+-
+ ifdef ENABLE_TRACEJIT
+ ifndef WINCE
+ JITFLAGS = ,m,j,mj,mjp,am,amj,amjp,amd