[mozjs17] Add patch to fix FTBFS on aarch64
Peter Robinson
pbrobinson at fedoraproject.org
Mon Jan 6 22:43:29 UTC 2014
commit 15c0732155546045e6d84155492787e6180a399a
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Mon Jan 6 22:43:24 2014 +0000
Add patch to fix FTBFS on aarch64
mozjs17-0001-Add-AArch64-support.patch | 59 ++++++++++++++++++++++++++++++++
mozjs17.spec | 9 ++++-
2 files changed, 66 insertions(+), 2 deletions(-)
---
diff --git a/mozjs17-0001-Add-AArch64-support.patch b/mozjs17-0001-Add-AArch64-support.patch
new file mode 100644
index 0000000..1965ff6
--- /dev/null
+++ b/mozjs17-0001-Add-AArch64-support.patch
@@ -0,0 +1,59 @@
+diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h
+index c071c33..90764c3 100644
+--- a/js/src/assembler/jit/ExecutableAllocator.h
++++ b/js/src/assembler/jit/ExecutableAllocator.h
+@@ -382,6 +382,12 @@ public:
+ {
+ reprotectRegion(start, size, Executable);
+ }
++#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX
++ static void cacheFlush(void* code, size_t size)
++ {
++ intptr_t end = reinterpret_cast<intptr_t>(code) + size;
++ __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end));
++ }
+ #else
+ static void makeWritable(void*, size_t) {}
+ static void makeExecutable(void*, size_t) {}
+diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
+index 0c84896..e8763a7 100644
+--- a/js/src/assembler/wtf/Platform.h
++++ b/js/src/assembler/wtf/Platform.h
+@@ -325,6 +325,10 @@
+ #define WTF_THUMB_ARCH_VERSION 0
+ #endif
+
++/* CPU(AArch64) - 64-bit ARM */
++#if defined(__aarch64__)
++#define WTF_CPU_AARCH64 1
++#endif
+
+ /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
+ /* On ARMv5 and below the natural alignment is required.
+diff --git a/js/src/configure.in b/js/src/configure.in
+index 15605b2..19fd704 100644
+--- a/js/src/configure.in
++++ b/js/src/configure.in
+@@ -1121,6 +1121,10 @@ arm*)
+ CPU_ARCH=arm
+ ;;
+
++aarch64)
++ CPU_ARCH=aarch64
++ ;;
++
+ mips|mipsel)
+ CPU_ARCH="mips"
+ ;;
+diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
+index 0eec2d9..fe26dab 100644
+--- a/mfbt/double-conversion/utils.h
++++ b/mfbt/double-conversion/utils.h
+@@ -58,6 +58,7 @@
+ defined(__mips__) || defined(__powerpc__) || \
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
++ defined(__aarch64__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
diff --git a/mozjs17.spec b/mozjs17.spec
index b0a8df5..ee60eb1 100644
--- a/mozjs17.spec
+++ b/mozjs17.spec
@@ -1,7 +1,7 @@
Summary: JavaScript interpreter and libraries
Name: mozjs17
Version: 17.0.0
-Release: 8%{?dist}
+Release: 9%{?dist}
License: GPLv2+ or LGPLv2+ or MPLv1.1
Group: Development/Languages
URL: http://www.mozilla.org/js/
@@ -15,7 +15,8 @@ BuildRequires: /usr/bin/autoconf-2.13
Patch0: js17-build-fixes.patch
# makes mozjs to match js from xul 21
Patch1: js17-jsval.patch
-Patch2: mozbug746112-no-decommit-on-large-pages.patch
+Patch2: mozbug746112-no-decommit-on-large-pages.patch
+Patch3: mozjs17-0001-Add-AArch64-support.patch
%description
JavaScript is the Netscape-developed object scripting language used in millions
@@ -41,6 +42,7 @@ rm js/src/ctypes/libffi -rf
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1 -b .aarch64
chmod a+x configure
(cd js/src && autoconf-2.13)
@@ -83,6 +85,9 @@ rm -f %{buildroot}%{_bindir}/js17-config
%{_includedir}/js-17.0
%changelog
+* Mon Jan 6 2014 Peter Robinson <pbrobinson at fedoraproject.org> 17.0.0-9
+- Add patch to fix FTBFS on aarch64
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 17.0.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list