Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj
authorMarcin Juszkiewicz <mjuszkiewicz@redhat.com>
Wed, 26 Feb 2014 13:43:16 -0500
changeset 171050 6a46f53ad944b44385398822d7bcf7621a785d91
parent 171049 0aa56e2a5f816a30da48701f73d03060ee9692b2
child 171051 d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersfroydnj
bugs962488
milestone30.0a1
Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj Fix imported from upstream repository: https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561
mfbt/double-conversion/fix-aarch64-macro.patch
mfbt/double-conversion/update.sh
mfbt/double-conversion/utils.h
new file mode 100644
--- /dev/null
+++ b/mfbt/double-conversion/fix-aarch64-macro.patch
@@ -0,0 +1,23 @@
+Backport from upstream.
+
+https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561
+
+---
+ mfbt/double-conversion/utils.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mfbt/double-conversion/utils.h
++++ b/mfbt/double-conversion/utils.h
+@@ -58,11 +58,11 @@
+     defined(__mips__) || \
+     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2) || \
+-    defined(_AARCH64EL_)
++    defined(__AARCH64EL__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #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
--- a/mfbt/double-conversion/update.sh
+++ b/mfbt/double-conversion/update.sh
@@ -15,9 +15,12 @@ cp $1/src/*.h ./
 
 # Source
 cp $1/src/*.cc ./
 
 patch -p3 < add-mfbt-api-markers.patch
 patch -p3 < use-StandardInteger.patch
 patch -p3 < use-mozilla-assertions.patch
 patch -p3 < use-static_assert.patch
-patch -p3 < ToPrecision-exponential.patch
\ No newline at end of file
+patch -p3 < ToPrecision-exponential.patch
+
+# Merged upstream, part of 2.0.1 version
+patch -p3 < fix-aarch64-macro.patch
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -55,17 +55,17 @@
 #if defined(_M_X64) || defined(__x86_64__) || \
     defined(__ARMEL__) || defined(__avr32__) || \
     defined(__hppa__) || defined(__ia64__) || \
     defined(__mips__) || \
     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
     defined(__SH4__) || defined(__alpha__) || \
     defined(_MIPS_ARCH_MIPS32R2) || \
-    defined(_AARCH64EL_)
+    defined(__AARCH64EL__)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 #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