From 372b0cda528111caa9ee0a92afdd2cc92186fc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 18 Sep 2014 22:05:52 +0200 Subject: [PATCH] Making spidermonkey_185 build on ARM, and so also polkit. --- .../interpreters/spidermonkey/185-1.0.0.nix | 17 ++++++++++++++++- .../spidermonkey/findvanilla.patch | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/spidermonkey/findvanilla.patch 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