01fa84
Index: b/configure
01fa84
===================================================================
01fa84
--- a/configure
01fa84
+++ b/configure
01fa84
@@ -2858,6 +2861,9 @@
01fa84
             *86_64)
01fa84
                 PLATFORM=qws/linux-x86_64-g++
01fa84
                 ;;
01fa84
+            aarch64)
01fa84
+                PLATFORM=linux-g++-aarch64
01fa84
+                ;;
01fa84
             *)
01fa84
                 PLATFORM=qws/linux-generic-g++
01fa84
                 ;;
01fa84
@@ -3303,6 +3309,12 @@
01fa84
             echo "    ARM (arm)"
01fa84
         fi
01fa84
         CFG_HOST_ARCH=arm
01fa84
+	;;
01fa84
+    *:*:aarch64*)
01fa84
+        if [ "$OPT_VERBOSE" = "yes" ]; then
01fa84
+            echo "    AArch64 (aarch64)"
01fa84
+        fi
01fa84
+        CFG_HOST_ARCH=aarch64
01fa84
         ;;
01fa84
     Linux:*:sparc*)
01fa84
         if [ "$OPT_VERBOSE" = "yes" ]; then
01fa84
diff --git a/include/QtCore/qatomic_aarch64.h b/include/QtCore/qatomic_aarch64.h
01fa84
new file mode 100644
01fa84
index 0000000..2049aec
01fa84
--- /dev/null
01fa84
+++ b/include/QtCore/qatomic_aarch64.h
01fa84
@@ -0,0 +1 @@
01fa84
+#include "../../src/corelib/arch/qatomic_aarch64.h"
01fa84
Index: b/mkspecs/linux-g++-aarch64/qmake.conf
01fa84
===================================================================
01fa84
--- /dev/null
01fa84
+++ b/mkspecs/linux-g++-aarch64/qmake.conf
01fa84
@@ -0,0 +1,28 @@
01fa84
+#
01fa84
+# qmake configuration for linux-g++
01fa84
+#
01fa84
+# Written for GNU/Linux platforms that have both lib and lib64 directories,
01fa84
+# like the AMD Opteron.
01fa84
+#
01fa84
+
01fa84
+MAKEFILE_GENERATOR	= UNIX
01fa84
+TARGET_PLATFORM		= unix
01fa84
+TEMPLATE		= app
01fa84
+CONFIG			+= qt warn_on release incremental link_prl gdb_dwarf_index
01fa84
+QT			+= core gui
01fa84
+QMAKE_INCREMENTAL_STYLE = sublib
01fa84
+
01fa84
+QMAKE_CFLAGS		= -fpermissive
01fa84
+QMAKE_LFLAGS		=
01fa84
+
01fa84
+QMAKE_CFLAGS_RELEASE   += -O2
01fa84
+
01fa84
+include(../common/linux.conf)
01fa84
+include(../common/gcc-base-unix.conf)
01fa84
+include(../common/g++-unix.conf)
01fa84
+
01fa84
+
01fa84
+QMAKE_LIBDIR_X11      = /usr/X11R6/lib64
01fa84
+QMAKE_LIBDIR_OPENGL   = /usr/X11R6/lib64
01fa84
+
01fa84
+load(qt_config)
01fa84
Index: b/mkspecs/linux-g++-aarch64/qplatformdefs.h
01fa84
===================================================================
01fa84
--- /dev/null
01fa84
+++ b/mkspecs/linux-g++-aarch64/qplatformdefs.h
01fa84
@@ -0,0 +1,42 @@
01fa84
+/****************************************************************************
01fa84
+**
01fa84
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
01fa84
+** Contact: http://www.qt-project.org/legal
01fa84
+**
01fa84
+** This file is part of the qmake spec of the Qt Toolkit.
01fa84
+**
01fa84
+** $QT_BEGIN_LICENSE:LGPL$
01fa84
+** Commercial License Usage
01fa84
+** Licensees holding valid commercial Qt licenses may use this file in
01fa84
+** accordance with the commercial license agreement provided with the
01fa84
+** Software or, alternatively, in accordance with the terms contained in
01fa84
+** a written agreement between you and Digia.  For licensing terms and
01fa84
+** conditions see http://qt.digia.com/licensing.  For further information
01fa84
+** use the contact form at http://qt.digia.com/contact-us.
01fa84
+**
01fa84
+** GNU Lesser General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU Lesser
01fa84
+** General Public License version 2.1 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.LGPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU Lesser General Public License version 2.1 requirements
01fa84
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
01fa84
+**
01fa84
+** In addition, as a special exception, Digia gives you certain additional
01fa84
+** rights.  These rights are described in the Digia Qt LGPL Exception
01fa84
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
01fa84
+**
01fa84
+** GNU General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU
01fa84
+** General Public License version 3.0 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.GPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU General Public License version 3.0 requirements will be
01fa84
+** met: http://www.gnu.org/copyleft/gpl.html.
01fa84
+**
01fa84
+**
01fa84
+** $QT_END_LICENSE$
01fa84
+**
01fa84
+****************************************************************************/
01fa84
+
01fa84
+#include "../linux-g++/qplatformdefs.h"
01fa84
Index: b/src/3rdparty/freetype/builds/unix/config.guess
01fa84
===================================================================
01fa84
--- a/src/3rdparty/freetype/builds/unix/config.guess
01fa84
+++ b/src/3rdparty/freetype/builds/unix/config.guess
01fa84
@@ -1,14 +1,12 @@
01fa84
 #! /bin/sh
01fa84
 # Attempt to guess a canonical system name.
01fa84
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
01fa84
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
01fa84
-#   Free Software Foundation, Inc.
01fa84
+#   Copyright 1992-2013 Free Software Foundation, Inc.
01fa84
 
01fa84
-timestamp='2009-02-03'
01fa84
+timestamp='2013-05-16'
01fa84
 
01fa84
 # This file is free software; you can redistribute it and/or modify it
01fa84
 # under the terms of the GNU General Public License as published by
01fa84
-# the Free Software Foundation; either version 2 of the License, or
01fa84
+# the Free Software Foundation; either version 3 of the License, or
01fa84
 # (at your option) any later version.
01fa84
 #
01fa84
 # This program is distributed in the hope that it will be useful, but
01fa84
@@ -17,26 +15,22 @@
01fa84
 # General Public License for more details.
01fa84
 #
01fa84
 # You should have received a copy of the GNU General Public License
01fa84
-# along with this program; if not, write to the Free Software
01fa84
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
01fa84
-# 02110-1301, USA.
01fa84
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
01fa84
 #
01fa84
 # As a special exception to the GNU General Public License, if you
01fa84
 # distribute this file as part of a program that contains a
01fa84
 # configuration script generated by Autoconf, you may include it under
01fa84
-# the same distribution terms that you use for the rest of that program.
01fa84
-
01fa84
-
01fa84
-# Originally written by Per Bothner <per@bothner.com>.
01fa84
-# Please send patches to <config-patches@gnu.org>.  Submit a context
01fa84
-# diff and a properly formatted ChangeLog entry.
01fa84
+# the same distribution terms that you use for the rest of that
01fa84
+# program.  This Exception is an additional permission under section 7
01fa84
+# of the GNU General Public License, version 3 ("GPLv3").
01fa84
+#
01fa84
+# Originally written by Per Bothner.
01fa84
 #
01fa84
-# This script attempts to guess a canonical system name similar to
01fa84
-# config.sub.  If it succeeds, it prints the system name on stdout, and
01fa84
-# exits with 0.  Otherwise, it exits with 1.
01fa84
+# You can get the latest version of this script from:
01fa84
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
01fa84
 #
01fa84
-# The plan is that this can be called by configure scripts if you
01fa84
-# don't specify an explicit build system type.
01fa84
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
01fa84
+
01fa84
 
01fa84
 me=`echo "$0" | sed -e 's,.*/,,'`
01fa84
 
01fa84
@@ -56,8 +50,7 @@
01fa84
 GNU config.guess ($timestamp)
01fa84
 
01fa84
 Originally written by Per Bothner.
01fa84
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
01fa84
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
01fa84
+Copyright 1992-2013 Free Software Foundation, Inc.
01fa84
 
01fa84
 This is free software; see the source for copying conditions.  There is NO
01fa84
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
01fa84
@@ -139,12 +132,33 @@
01fa84
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
01fa84
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
01fa84
 
01fa84
+case "${UNAME_SYSTEM}" in
01fa84
+Linux|GNU|GNU/*)
01fa84
+	# If the system lacks a compiler, then just pick glibc.
01fa84
+	# We could probably try harder.
01fa84
+	LIBC=gnu
01fa84
+
01fa84
+	eval $set_cc_for_build
01fa84
+	cat <<-EOF > $dummy.c
01fa84
+	#include <features.h>
01fa84
+	#if defined(__UCLIBC__)
01fa84
+	LIBC=uclibc
01fa84
+	#elif defined(__dietlibc__)
01fa84
+	LIBC=dietlibc
01fa84
+	#else
01fa84
+	LIBC=gnu
01fa84
+	#endif
01fa84
+	EOF
01fa84
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
01fa84
+	;;
01fa84
+esac
01fa84
+
01fa84
 # Note: order is significant - the case branches are not exclusive.
01fa84
 
01fa84
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
01fa84
     *:NetBSD:*:*)
01fa84
 	# NetBSD (nbsd) targets should (where applicable) match one or
01fa84
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
01fa84
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
01fa84
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
01fa84
 	# switched to ELF, *-*-netbsd* would select the old
01fa84
 	# object file format.  This provides both forward
01fa84
@@ -170,7 +184,7 @@
01fa84
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
01fa84
 		eval $set_cc_for_build
01fa84
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
01fa84
-			| grep __ELF__ >/dev/null
01fa84
+			| grep -q __ELF__
01fa84
 		then
01fa84
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
01fa84
 		    # Return netbsd for either.  FIX?
01fa84
@@ -180,7 +194,7 @@
01fa84
 		fi
01fa84
 		;;
01fa84
 	    *)
01fa84
-	        os=netbsd
01fa84
+		os=netbsd
01fa84
 		;;
01fa84
 	esac
01fa84
 	# The OS release
01fa84
@@ -201,6 +215,10 @@
01fa84
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
01fa84
 	echo "${machine}-${os}${release}"
01fa84
 	exit ;;
01fa84
+    *:Bitrig:*:*)
01fa84
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
01fa84
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
     *:OpenBSD:*:*)
01fa84
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
01fa84
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
01fa84
@@ -223,7 +241,7 @@
01fa84
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
01fa84
 		;;
01fa84
 	*5.*)
01fa84
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
01fa84
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
01fa84
 		;;
01fa84
 	esac
01fa84
 	# According to Compaq, /usr/sbin/psrinfo has been available on
01fa84
@@ -269,7 +287,10 @@
01fa84
 	# A Xn.n version is an unreleased experimental baselevel.
01fa84
 	# 1.2 uses "1.2" for uname -r.
01fa84
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
01fa84
-	exit ;;
01fa84
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
01fa84
+	exitcode=$?
01fa84
+	trap '' 0
01fa84
+	exit $exitcode ;;
01fa84
     Alpha\ *:Windows_NT*:*)
01fa84
 	# How do we know it's Interix rather than the generic POSIX subsystem?
01fa84
 	# Should we change UNAME_MACHINE based on the output of uname instead
01fa84
@@ -295,12 +316,12 @@
01fa84
 	echo s390-ibm-zvmoe
01fa84
 	exit ;;
01fa84
     *:OS400:*:*)
01fa84
-        echo powerpc-ibm-os400
01fa84
+	echo powerpc-ibm-os400
01fa84
 	exit ;;
01fa84
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
01fa84
 	echo arm-acorn-riscix${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
-    arm:riscos:*:*|arm:RISCOS:*:*)
01fa84
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
01fa84
 	echo arm-unknown-riscos
01fa84
 	exit ;;
01fa84
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
01fa84
@@ -324,12 +345,18 @@
01fa84
 	case `/usr/bin/uname -p` in
01fa84
 	    sparc) echo sparc-icl-nx7; exit ;;
01fa84
 	esac ;;
01fa84
+    s390x:SunOS:*:*)
01fa84
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
01fa84
+	exit ;;
01fa84
     sun4H:SunOS:5.*:*)
01fa84
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
01fa84
 	exit ;;
01fa84
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
01fa84
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
01fa84
 	exit ;;
01fa84
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
01fa84
+	echo i386-pc-auroraux${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
01fa84
 	eval $set_cc_for_build
01fa84
 	SUN_ARCH="i386"
01fa84
@@ -388,23 +415,23 @@
01fa84
     # MiNT.  But MiNT is downward compatible to TOS, so this should
01fa84
     # be no problem.
01fa84
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
01fa84
-        echo m68k-atari-mint${UNAME_RELEASE}
01fa84
+	echo m68k-atari-mint${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
01fa84
 	echo m68k-atari-mint${UNAME_RELEASE}
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
01fa84
-        echo m68k-atari-mint${UNAME_RELEASE}
01fa84
+	echo m68k-atari-mint${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
01fa84
-        echo m68k-milan-mint${UNAME_RELEASE}
01fa84
-        exit ;;
01fa84
+	echo m68k-milan-mint${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
01fa84
-        echo m68k-hades-mint${UNAME_RELEASE}
01fa84
-        exit ;;
01fa84
+	echo m68k-hades-mint${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
01fa84
-        echo m68k-unknown-mint${UNAME_RELEASE}
01fa84
-        exit ;;
01fa84
+	echo m68k-unknown-mint${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
     m68k:machten:*:*)
01fa84
 	echo m68k-apple-machten${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
@@ -474,8 +501,8 @@
01fa84
 	echo m88k-motorola-sysv3
01fa84
 	exit ;;
01fa84
     AViiON:dgux:*:*)
01fa84
-        # DG/UX returns AViiON for all architectures
01fa84
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
01fa84
+	# DG/UX returns AViiON for all architectures
01fa84
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
01fa84
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
01fa84
 	then
01fa84
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
01fa84
@@ -488,7 +515,7 @@
01fa84
 	else
01fa84
 	    echo i586-dg-dgux${UNAME_RELEASE}
01fa84
 	fi
01fa84
- 	exit ;;
01fa84
+	exit ;;
01fa84
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
01fa84
 	echo m88k-dolphin-sysv3
01fa84
 	exit ;;
01fa84
@@ -545,7 +572,7 @@
01fa84
 		echo rs6000-ibm-aix3.2
01fa84
 	fi
01fa84
 	exit ;;
01fa84
-    *:AIX:*:[456])
01fa84
+    *:AIX:*:[4567])
01fa84
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
01fa84
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
01fa84
 		IBM_ARCH=rs6000
01fa84
@@ -588,52 +615,52 @@
01fa84
 	    9000/[678][0-9][0-9])
01fa84
 		if [ -x /usr/bin/getconf ]; then
01fa84
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
01fa84
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
01fa84
-                    case "${sc_cpu_version}" in
01fa84
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
01fa84
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
01fa84
-                      532)                      # CPU_PA_RISC2_0
01fa84
-                        case "${sc_kernel_bits}" in
01fa84
-                          32) HP_ARCH="hppa2.0n" ;;
01fa84
-                          64) HP_ARCH="hppa2.0w" ;;
01fa84
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
01fa84
+		    case "${sc_cpu_version}" in
01fa84
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
01fa84
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
01fa84
+		      532)                      # CPU_PA_RISC2_0
01fa84
+			case "${sc_kernel_bits}" in
01fa84
+			  32) HP_ARCH="hppa2.0n" ;;
01fa84
+			  64) HP_ARCH="hppa2.0w" ;;
01fa84
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
01fa84
-                        esac ;;
01fa84
-                    esac
01fa84
+			esac ;;
01fa84
+		    esac
01fa84
 		fi
01fa84
 		if [ "${HP_ARCH}" = "" ]; then
01fa84
 		    eval $set_cc_for_build
01fa84
-		    sed 's/^              //' << EOF >$dummy.c
01fa84
+		    sed 's/^		//' << EOF >$dummy.c
01fa84
 
01fa84
-              #define _HPUX_SOURCE
01fa84
-              #include <stdlib.h>
01fa84
-              #include <unistd.h>
01fa84
-
01fa84
-              int main ()
01fa84
-              {
01fa84
-              #if defined(_SC_KERNEL_BITS)
01fa84
-                  long bits = sysconf(_SC_KERNEL_BITS);
01fa84
-              #endif
01fa84
-                  long cpu  = sysconf (_SC_CPU_VERSION);
01fa84
-
01fa84
-                  switch (cpu)
01fa84
-              	{
01fa84
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
01fa84
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
01fa84
-              	case CPU_PA_RISC2_0:
01fa84
-              #if defined(_SC_KERNEL_BITS)
01fa84
-              	    switch (bits)
01fa84
-              		{
01fa84
-              		case 64: puts ("hppa2.0w"); break;
01fa84
-              		case 32: puts ("hppa2.0n"); break;
01fa84
-              		default: puts ("hppa2.0"); break;
01fa84
-              		} break;
01fa84
-              #else  /* !defined(_SC_KERNEL_BITS) */
01fa84
-              	    puts ("hppa2.0"); break;
01fa84
-              #endif
01fa84
-              	default: puts ("hppa1.0"); break;
01fa84
-              	}
01fa84
-                  exit (0);
01fa84
-              }
01fa84
+		#define _HPUX_SOURCE
01fa84
+		#include <stdlib.h>
01fa84
+		#include <unistd.h>
01fa84
+
01fa84
+		int main ()
01fa84
+		{
01fa84
+		#if defined(_SC_KERNEL_BITS)
01fa84
+		    long bits = sysconf(_SC_KERNEL_BITS);
01fa84
+		#endif
01fa84
+		    long cpu  = sysconf (_SC_CPU_VERSION);
01fa84
+
01fa84
+		    switch (cpu)
01fa84
+			{
01fa84
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
01fa84
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
01fa84
+			case CPU_PA_RISC2_0:
01fa84
+		#if defined(_SC_KERNEL_BITS)
01fa84
+			    switch (bits)
01fa84
+				{
01fa84
+				case 64: puts ("hppa2.0w"); break;
01fa84
+				case 32: puts ("hppa2.0n"); break;
01fa84
+				default: puts ("hppa2.0"); break;
01fa84
+				} break;
01fa84
+		#else  /* !defined(_SC_KERNEL_BITS) */
01fa84
+			    puts ("hppa2.0"); break;
01fa84
+		#endif
01fa84
+			default: puts ("hppa1.0"); break;
01fa84
+			}
01fa84
+		    exit (0);
01fa84
+		}
01fa84
 EOF
01fa84
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
01fa84
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
01fa84
@@ -653,7 +680,7 @@
01fa84
 	    # => hppa64-hp-hpux11.23
01fa84
 
01fa84
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
01fa84
-		grep __LP64__ >/dev/null
01fa84
+		grep -q __LP64__
01fa84
 	    then
01fa84
 		HP_ARCH="hppa2.0w"
01fa84
 	    else
01fa84
@@ -724,22 +751,22 @@
01fa84
 	exit ;;
01fa84
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
01fa84
 	echo c1-convex-bsd
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
01fa84
 	if getsysinfo -f scalar_acc
01fa84
 	then echo c32-convex-bsd
01fa84
 	else echo c2-convex-bsd
01fa84
 	fi
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
01fa84
 	echo c34-convex-bsd
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
01fa84
 	echo c38-convex-bsd
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
01fa84
 	echo c4-convex-bsd
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     CRAY*Y-MP:*:*:*)
01fa84
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
01fa84
 	exit ;;
01fa84
@@ -763,14 +790,14 @@
01fa84
 	exit ;;
01fa84
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
01fa84
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
01fa84
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
01fa84
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
01fa84
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
01fa84
-        exit ;;
01fa84
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
01fa84
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
01fa84
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
01fa84
+	exit ;;
01fa84
     5000:UNIX_System_V:4.*:*)
01fa84
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
01fa84
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
01fa84
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
01fa84
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
01fa84
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
01fa84
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
01fa84
 	exit ;;
01fa84
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
01fa84
@@ -782,34 +809,39 @@
01fa84
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     *:FreeBSD:*:*)
01fa84
-	case ${UNAME_MACHINE} in
01fa84
-	    pc98)
01fa84
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
01fa84
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
01fa84
+	case ${UNAME_PROCESSOR} in
01fa84
 	    amd64)
01fa84
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
01fa84
 	    *)
01fa84
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
01fa84
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
01fa84
 	esac
01fa84
 	exit ;;
01fa84
     i*:CYGWIN*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-cygwin
01fa84
 	exit ;;
01fa84
+    *:MINGW64*:*)
01fa84
+	echo ${UNAME_MACHINE}-pc-mingw64
01fa84
+	exit ;;
01fa84
     *:MINGW*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-mingw32
01fa84
 	exit ;;
01fa84
+    i*:MSYS*:*)
01fa84
+	echo ${UNAME_MACHINE}-pc-msys
01fa84
+	exit ;;
01fa84
     i*:windows32*:*)
01fa84
-    	# uname -m includes "-pc" on this system.
01fa84
-    	echo ${UNAME_MACHINE}-mingw32
01fa84
+	# uname -m includes "-pc" on this system.
01fa84
+	echo ${UNAME_MACHINE}-mingw32
01fa84
 	exit ;;
01fa84
     i*:PW*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-pw32
01fa84
 	exit ;;
01fa84
-    *:Interix*:[3456]*)
01fa84
-    	case ${UNAME_MACHINE} in
01fa84
+    *:Interix*:*)
01fa84
+	case ${UNAME_MACHINE} in
01fa84
 	    x86)
01fa84
 		echo i586-pc-interix${UNAME_RELEASE}
01fa84
 		exit ;;
01fa84
-	    EM64T | authenticamd | genuineintel)
01fa84
+	    authenticamd | genuineintel | EM64T)
01fa84
 		echo x86_64-unknown-interix${UNAME_RELEASE}
01fa84
 		exit ;;
01fa84
 	    IA64)
01fa84
@@ -819,6 +851,9 @@
01fa84
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
01fa84
 	echo i${UNAME_MACHINE}-pc-mks
01fa84
 	exit ;;
01fa84
+    8664:Windows_NT:*)
01fa84
+	echo x86_64-pc-mks
01fa84
+	exit ;;
01fa84
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
01fa84
 	# How do we know it's Interix rather than the generic POSIX subsystem?
01fa84
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
01fa84
@@ -839,210 +874,151 @@
01fa84
 	exit ;;
01fa84
     *:GNU:*:*)
01fa84
 	# the GNU system
01fa84
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
01fa84
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
01fa84
 	exit ;;
01fa84
     *:GNU/*:*:*)
01fa84
 	# other systems with GNU libc and userland
01fa84
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
01fa84
 	exit ;;
01fa84
     i*86:Minix:*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-minix
01fa84
 	exit ;;
01fa84
+    aarch64:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    aarch64_be:Linux:*:*)
01fa84
+	UNAME_MACHINE=aarch64_be
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    alpha:Linux:*:*)
01fa84
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
01fa84
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
01fa84
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
01fa84
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
01fa84
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
01fa84
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
01fa84
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
01fa84
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
01fa84
+	esac
01fa84
+	objdump --private-headers /bin/sh | grep -q ld.so.1
01fa84
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    arc:Linux:*:* | arceb:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
     arm*:Linux:*:*)
01fa84
 	eval $set_cc_for_build
01fa84
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
01fa84
 	    | grep -q __ARM_EABI__
01fa84
 	then
01fa84
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	else
01fa84
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
01fa84
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
01fa84
+		| grep -q __ARM_PCS_VFP
01fa84
+	    then
01fa84
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
01fa84
+	    else
01fa84
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
01fa84
+	    fi
01fa84
 	fi
01fa84
 	exit ;;
01fa84
     avr32*:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     cris:Linux:*:*)
01fa84
-	echo cris-axis-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     crisv32:Linux:*:*)
01fa84
-	echo crisv32-axis-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     frv:Linux:*:*)
01fa84
-    	echo frv-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    hexagon:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    i*86:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     ia64:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     m32r*:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     m68*:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
-    mips:Linux:*:*)
01fa84
+    mips:Linux:*:* | mips64:Linux:*:*)
01fa84
 	eval $set_cc_for_build
01fa84
 	sed 's/^	//' << EOF >$dummy.c
01fa84
 	#undef CPU
01fa84
-	#undef mips
01fa84
-	#undef mipsel
01fa84
+	#undef ${UNAME_MACHINE}
01fa84
+	#undef ${UNAME_MACHINE}el
01fa84
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
01fa84
-	CPU=mipsel
01fa84
+	CPU=${UNAME_MACHINE}el
01fa84
 	#else
01fa84
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
01fa84
-	CPU=mips
01fa84
+	CPU=${UNAME_MACHINE}
01fa84
 	#else
01fa84
 	CPU=
01fa84
 	#endif
01fa84
 	#endif
01fa84
 EOF
01fa84
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
01fa84
-	    /^CPU/{
01fa84
-		s: ::g
01fa84
-		p
01fa84
-	    }'`"
01fa84
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
01fa84
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
01fa84
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
01fa84
 	;;
01fa84
-    mips64:Linux:*:*)
01fa84
-	eval $set_cc_for_build
01fa84
-	sed 's/^	//' << EOF >$dummy.c
01fa84
-	#undef CPU
01fa84
-	#undef mips64
01fa84
-	#undef mips64el
01fa84
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
01fa84
-	CPU=mips64el
01fa84
-	#else
01fa84
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
01fa84
-	CPU=mips64
01fa84
-	#else
01fa84
-	CPU=
01fa84
-	#endif
01fa84
-	#endif
01fa84
-EOF
01fa84
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
01fa84
-	    /^CPU/{
01fa84
-		s: ::g
01fa84
-		p
01fa84
-	    }'`"
01fa84
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
01fa84
-	;;
01fa84
-    or32:Linux:*:*)
01fa84
-	echo or32-unknown-linux-gnu
01fa84
+    or1k:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
-    ppc:Linux:*:*)
01fa84
-	echo powerpc-unknown-linux-gnu
01fa84
-	exit ;;
01fa84
-    ppc64:Linux:*:*)
01fa84
-	echo powerpc64-unknown-linux-gnu
01fa84
-	exit ;;
01fa84
-    alpha:Linux:*:*)
01fa84
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
01fa84
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
01fa84
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
01fa84
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
01fa84
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
01fa84
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
01fa84
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
01fa84
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
01fa84
-        esac
01fa84
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
01fa84
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
01fa84
+    or32:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     padre:Linux:*:*)
01fa84
-	echo sparc-unknown-linux-gnu
01fa84
+	echo sparc-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
01fa84
+	echo hppa64-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     parisc:Linux:*:* | hppa:Linux:*:*)
01fa84
 	# Look for CPU level
01fa84
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
01fa84
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
01fa84
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
01fa84
-	  *)    echo hppa-unknown-linux-gnu ;;
01fa84
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
01fa84
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
01fa84
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
01fa84
 	esac
01fa84
 	exit ;;
01fa84
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
01fa84
-	echo hppa64-unknown-linux-gnu
01fa84
+    ppc64:Linux:*:*)
01fa84
+	echo powerpc64-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    ppc:Linux:*:*)
01fa84
+	echo powerpc-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     s390:Linux:*:* | s390x:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-ibm-linux
01fa84
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     sh64*:Linux:*:*)
01fa84
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     sh*:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     sparc:Linux:*:* | sparc64:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
+	exit ;;
01fa84
+    tile*:Linux:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     vax:Linux:*:*)
01fa84
-	echo ${UNAME_MACHINE}-dec-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     x86_64:Linux:*:*)
01fa84
-	echo x86_64-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
     xtensa*:Linux:*:*)
01fa84
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
01fa84
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
01fa84
 	exit ;;
01fa84
-    i*86:Linux:*:*)
01fa84
-	# The BFD linker knows what the default object file format is, so
01fa84
-	# first see if it will tell us. cd to the root directory to prevent
01fa84
-	# problems with other programs or directories called `ld' in the path.
01fa84
-	# Set LC_ALL=C to ensure ld outputs messages in English.
01fa84
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
01fa84
-			 | sed -ne '/supported targets:/!d
01fa84
-				    s/[ 	][ 	]*/ /g
01fa84
-				    s/.*supported targets: *//
01fa84
-				    s/ .*//
01fa84
-				    p'`
01fa84
-        case "$ld_supported_targets" in
01fa84
-	  elf32-i386)
01fa84
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
01fa84
-		;;
01fa84
-	  a.out-i386-linux)
01fa84
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
01fa84
-		exit ;;
01fa84
-	  "")
01fa84
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
01fa84
-		# one that does not give us useful --help.
01fa84
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
01fa84
-		exit ;;
01fa84
-	esac
01fa84
-	# Determine whether the default compiler is a.out or elf
01fa84
-	eval $set_cc_for_build
01fa84
-	sed 's/^	//' << EOF >$dummy.c
01fa84
-	#include <features.h>
01fa84
-	#ifdef __ELF__
01fa84
-	# ifdef __GLIBC__
01fa84
-	#  if __GLIBC__ >= 2
01fa84
-	LIBC=gnu
01fa84
-	#  else
01fa84
-	LIBC=gnulibc1
01fa84
-	#  endif
01fa84
-	# else
01fa84
-	LIBC=gnulibc1
01fa84
-	# endif
01fa84
-	#else
01fa84
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
01fa84
-	LIBC=gnu
01fa84
-	#else
01fa84
-	LIBC=gnuaout
01fa84
-	#endif
01fa84
-	#endif
01fa84
-	#ifdef __dietlibc__
01fa84
-	LIBC=dietlibc
01fa84
-	#endif
01fa84
-EOF
01fa84
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
01fa84
-	    /^LIBC/{
01fa84
-		s: ::g
01fa84
-		p
01fa84
-	    }'`"
01fa84
-	test x"${LIBC}" != x && {
01fa84
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
01fa84
-		exit
01fa84
-	}
01fa84
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
01fa84
-	;;
01fa84
     i*86:DYNIX/ptx:4*:*)
01fa84
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
01fa84
 	# earlier versions are messed up and put the nodename in both
01fa84
@@ -1050,11 +1026,11 @@
01fa84
 	echo i386-sequent-sysv4
01fa84
 	exit ;;
01fa84
     i*86:UNIX_SV:4.2MP:2.*)
01fa84
-        # Unixware is an offshoot of SVR4, but it has its own version
01fa84
-        # number series starting with 2...
01fa84
-        # I am not positive that other SVR4 systems won't match this,
01fa84
+	# Unixware is an offshoot of SVR4, but it has its own version
01fa84
+	# number series starting with 2...
01fa84
+	# I am not positive that other SVR4 systems won't match this,
01fa84
 	# I just have to hope.  -- rms.
01fa84
-        # Use sysv4.2uw... so that sysv4* matches it.
01fa84
+	# Use sysv4.2uw... so that sysv4* matches it.
01fa84
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
01fa84
 	exit ;;
01fa84
     i*86:OS/2:*:*)
01fa84
@@ -1071,7 +1047,7 @@
01fa84
     i*86:syllable:*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-syllable
01fa84
 	exit ;;
01fa84
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
01fa84
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
01fa84
 	echo i386-unknown-lynxos${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     i*86:*DOS:*:*)
01fa84
@@ -1086,7 +1062,7 @@
01fa84
 	fi
01fa84
 	exit ;;
01fa84
     i*86:*:5:[678]*)
01fa84
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
01fa84
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
01fa84
 	case `/bin/uname -X | grep "^Machine"` in
01fa84
 	    *486*)	     UNAME_MACHINE=i486 ;;
01fa84
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
01fa84
@@ -1114,10 +1090,13 @@
01fa84
 	exit ;;
01fa84
     pc:*:*:*)
01fa84
 	# Left here for compatibility:
01fa84
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
01fa84
-        # the processor, so we play safe by assuming i386.
01fa84
-	echo i386-pc-msdosdjgpp
01fa84
-        exit ;;
01fa84
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
01fa84
+	# the processor, so we play safe by assuming i586.
01fa84
+	# Note: whatever this is, it MUST be the same as what config.sub
01fa84
+	# prints for the "djgpp" host, or else GDB configury will decide that
01fa84
+	# this is a cross-build.
01fa84
+	echo i586-pc-msdosdjgpp
01fa84
+	exit ;;
01fa84
     Intel:Mach:3*:*)
01fa84
 	echo i386-pc-mach3
01fa84
 	exit ;;
01fa84
@@ -1152,8 +1131,8 @@
01fa84
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
01fa84
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
01fa84
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
01fa84
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
01fa84
-          && { echo i486-ncr-sysv4; exit; } ;;
01fa84
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
01fa84
+	  && { echo i486-ncr-sysv4; exit; } ;;
01fa84
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
01fa84
 	OS_REL='.3'
01fa84
 	test -r /etc/.relid \
01fa84
@@ -1176,7 +1155,7 @@
01fa84
     rs6000:LynxOS:2.*:*)
01fa84
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
01fa84
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
01fa84
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     SM[BE]S:UNIX_SV:*:*)
01fa84
@@ -1196,10 +1175,10 @@
01fa84
 		echo ns32k-sni-sysv
01fa84
 	fi
01fa84
 	exit ;;
01fa84
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
01fa84
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
01fa84
-        echo i586-unisys-sysv4
01fa84
-        exit ;;
01fa84
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
01fa84
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
01fa84
+	echo i586-unisys-sysv4
01fa84
+	exit ;;
01fa84
     *:UNIX_System_V:4*:FTX*)
01fa84
 	# From Gerald Hewes <hewes@openmarket.com>.
01fa84
 	# How about differentiating between stratus architectures? -djm
01fa84
@@ -1225,11 +1204,11 @@
01fa84
 	exit ;;
01fa84
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
01fa84
 	if [ -d /usr/nec ]; then
01fa84
-	        echo mips-nec-sysv${UNAME_RELEASE}
01fa84
+		echo mips-nec-sysv${UNAME_RELEASE}
01fa84
 	else
01fa84
-	        echo mips-unknown-sysv${UNAME_RELEASE}
01fa84
+		echo mips-unknown-sysv${UNAME_RELEASE}
01fa84
 	fi
01fa84
-        exit ;;
01fa84
+	exit ;;
01fa84
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
01fa84
 	echo powerpc-be-beos
01fa84
 	exit ;;
01fa84
@@ -1242,6 +1221,9 @@
01fa84
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
01fa84
 	echo i586-pc-haiku
01fa84
 	exit ;;
01fa84
+    x86_64:Haiku:*:*)
01fa84
+	echo x86_64-unknown-haiku
01fa84
+	exit ;;
01fa84
     SX-4:SUPER-UX:*:*)
01fa84
 	echo sx4-nec-superux${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
@@ -1268,9 +1250,21 @@
01fa84
 	exit ;;
01fa84
     *:Darwin:*:*)
01fa84
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
01fa84
-	case $UNAME_PROCESSOR in
01fa84
-	    unknown) UNAME_PROCESSOR=powerpc ;;
01fa84
-	esac
01fa84
+	eval $set_cc_for_build
01fa84
+	if test "$UNAME_PROCESSOR" = unknown ; then
01fa84
+	    UNAME_PROCESSOR=powerpc
01fa84
+	fi
01fa84
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
01fa84
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
01fa84
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
01fa84
+		grep IS_64BIT_ARCH >/dev/null
01fa84
+	    then
01fa84
+		case $UNAME_PROCESSOR in
01fa84
+		    i386) UNAME_PROCESSOR=x86_64 ;;
01fa84
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
01fa84
+		esac
01fa84
+	    fi
01fa84
+	fi
01fa84
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
01fa84
@@ -1284,7 +1278,10 @@
01fa84
     *:QNX:*:4*)
01fa84
 	echo i386-pc-qnx
01fa84
 	exit ;;
01fa84
-    NSE-?:NONSTOP_KERNEL:*:*)
01fa84
+    NEO-?:NONSTOP_KERNEL:*:*)
01fa84
+	echo neo-tandem-nsk${UNAME_RELEASE}
01fa84
+	exit ;;
01fa84
+    NSE-*:NONSTOP_KERNEL:*:*)
01fa84
 	echo nse-tandem-nsk${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     NSR-?:NONSTOP_KERNEL:*:*)
01fa84
@@ -1329,13 +1326,13 @@
01fa84
 	echo pdp10-unknown-its
01fa84
 	exit ;;
01fa84
     SEI:*:*:SEIUX)
01fa84
-        echo mips-sei-seiux${UNAME_RELEASE}
01fa84
+	echo mips-sei-seiux${UNAME_RELEASE}
01fa84
 	exit ;;
01fa84
     *:DragonFly:*:*)
01fa84
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
01fa84
 	exit ;;
01fa84
     *:*VMS:*:*)
01fa84
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
01fa84
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
01fa84
 	case "${UNAME_MACHINE}" in
01fa84
 	    A*) echo alpha-dec-vms ; exit ;;
01fa84
 	    I*) echo ia64-dec-vms ; exit ;;
01fa84
@@ -1353,11 +1350,11 @@
01fa84
     i*86:AROS:*:*)
01fa84
 	echo ${UNAME_MACHINE}-pc-aros
01fa84
 	exit ;;
01fa84
+    x86_64:VMkernel:*:*)
01fa84
+	echo ${UNAME_MACHINE}-unknown-esx
01fa84
+	exit ;;
01fa84
 esac
01fa84
 
01fa84
-#echo '(No uname command or uname output not recognized.)' 1>&2
01fa84
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
01fa84
-
01fa84
 eval $set_cc_for_build
01fa84
 cat >$dummy.c <
01fa84
 #ifdef _SEQUENT_
01fa84
@@ -1375,11 +1372,11 @@
01fa84
 #include <sys/param.h>
01fa84
   printf ("m68k-sony-newsos%s\n",
01fa84
 #ifdef NEWSOS4
01fa84
-          "4"
01fa84
+	"4"
01fa84
 #else
01fa84
-	  ""
01fa84
+	""
01fa84
 #endif
01fa84
-         ); exit (0);
01fa84
+	); exit (0);
01fa84
 #endif
01fa84
 #endif
01fa84
 
01fa84
Index: b/src/3rdparty/freetype/builds/unix/config.sub
01fa84
===================================================================
01fa84
--- a/src/3rdparty/freetype/builds/unix/config.sub
01fa84
+++ b/src/3rdparty/freetype/builds/unix/config.sub
01fa84
@@ -1,44 +1,40 @@
01fa84
 #! /bin/sh
01fa84
 # Configuration validation subroutine script.
01fa84
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
01fa84
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
01fa84
-#   Free Software Foundation, Inc.
01fa84
-
01fa84
-timestamp='2009-02-03'
01fa84
-
01fa84
-# This file is (in principle) common to ALL GNU software.
01fa84
-# The presence of a machine in this file suggests that SOME GNU software
01fa84
-# can handle that machine.  It does not imply ALL GNU software can.
01fa84
-#
01fa84
-# This file is free software; you can redistribute it and/or modify
01fa84
-# it under the terms of the GNU General Public License as published by
01fa84
-# the Free Software Foundation; either version 2 of the License, or
01fa84
+#   Copyright 1992-2013 Free Software Foundation, Inc.
01fa84
+
01fa84
+timestamp='2013-04-24'
01fa84
+
01fa84
+# This file is free software; you can redistribute it and/or modify it
01fa84
+# under the terms of the GNU General Public License as published by
01fa84
+# the Free Software Foundation; either version 3 of the License, or
01fa84
 # (at your option) any later version.
01fa84
 #
01fa84
-# This program is distributed in the hope that it will be useful,
01fa84
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
01fa84
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
01fa84
-# GNU General Public License for more details.
01fa84
+# This program is distributed in the hope that it will be useful, but
01fa84
+# WITHOUT ANY WARRANTY; without even the implied warranty of
01fa84
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01fa84
+# General Public License for more details.
01fa84
 #
01fa84
 # You should have received a copy of the GNU General Public License
01fa84
-# along with this program; if not, write to the Free Software
01fa84
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
01fa84
-# 02110-1301, USA.
01fa84
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
01fa84
 #
01fa84
 # As a special exception to the GNU General Public License, if you
01fa84
 # distribute this file as part of a program that contains a
01fa84
 # configuration script generated by Autoconf, you may include it under
01fa84
-# the same distribution terms that you use for the rest of that program.
01fa84
+# the same distribution terms that you use for the rest of that
01fa84
+# program.  This Exception is an additional permission under section 7
01fa84
+# of the GNU General Public License, version 3 ("GPLv3").
01fa84
 
01fa84
 
01fa84
-# Please send patches to <config-patches@gnu.org>.  Submit a context
01fa84
-# diff and a properly formatted ChangeLog entry.
01fa84
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
01fa84
 #
01fa84
 # Configuration subroutine to validate and canonicalize a configuration type.
01fa84
 # Supply the specified configuration type as an argument.
01fa84
 # If it is invalid, we print an error message on stderr and exit with code 1.
01fa84
 # Otherwise, we print the canonical config type on stdout and succeed.
01fa84
 
01fa84
+# You can get the latest version of this script from:
01fa84
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
01fa84
+
01fa84
 # This file is supposed to be the same for all GNU packages
01fa84
 # and recognize all the CPU types, system types and aliases
01fa84
 # that are meaningful with *any* GNU software.
01fa84
@@ -72,8 +68,7 @@
01fa84
 version="\
01fa84
 GNU config.sub ($timestamp)
01fa84
 
01fa84
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
01fa84
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
01fa84
+Copyright 1992-2013 Free Software Foundation, Inc.
01fa84
 
01fa84
 This is free software; see the source for copying conditions.  There is NO
01fa84
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
01fa84
@@ -120,13 +115,18 @@
01fa84
 # Here we must recognize all the valid KERNEL-OS combinations.
01fa84
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
01fa84
 case $maybe_os in
01fa84
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
01fa84
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
01fa84
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
01fa84
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
01fa84
+  knetbsd*-gnu* | netbsd*-gnu* | \
01fa84
   kopensolaris*-gnu* | \
01fa84
   storm-chaos* | os2-emx* | rtmk-nova*)
01fa84
     os=-$maybe_os
01fa84
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
01fa84
     ;;
01fa84
+  android-linux)
01fa84
+    os=-linux-android
01fa84
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
01fa84
+    ;;
01fa84
   *)
01fa84
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
01fa84
     if [ $basic_machine != $1 ]
01fa84
@@ -149,10 +149,13 @@
01fa84
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
01fa84
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
01fa84
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
01fa84
-	-apple | -axis | -knuth | -cray)
01fa84
+	-apple | -axis | -knuth | -cray | -microblaze*)
01fa84
 		os=
01fa84
 		basic_machine=$1
01fa84
 		;;
01fa84
+	-bluegene*)
01fa84
+		os=-cnk
01fa84
+		;;
01fa84
 	-sim | -cisco | -oki | -wec | -winbond)
01fa84
 		os=
01fa84
 		basic_machine=$1
01fa84
@@ -167,10 +170,10 @@
01fa84
 		os=-chorusos
01fa84
 		basic_machine=$1
01fa84
 		;;
01fa84
- 	-chorusrdb)
01fa84
- 		os=-chorusrdb
01fa84
+	-chorusrdb)
01fa84
+		os=-chorusrdb
01fa84
 		basic_machine=$1
01fa84
- 		;;
01fa84
+		;;
01fa84
 	-hiux*)
01fa84
 		os=-hiuxwe2
01fa84
 		;;
01fa84
@@ -215,6 +218,12 @@
01fa84
 	-isc*)
01fa84
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
01fa84
 		;;
01fa84
+	-lynx*178)
01fa84
+		os=-lynxos178
01fa84
+		;;
01fa84
+	-lynx*5)
01fa84
+		os=-lynxos5
01fa84
+		;;
01fa84
 	-lynx*)
01fa84
 		os=-lynxos
01fa84
 		;;
01fa84
@@ -239,20 +248,27 @@
01fa84
 	# Some are omitted here because they have special meanings below.
01fa84
 	1750a | 580 \
01fa84
 	| a29k \
01fa84
+	| aarch64 | aarch64_be \
01fa84
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
01fa84
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
01fa84
 	| am33_2.0 \
01fa84
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
01fa84
+	| arc | arceb \
01fa84
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
01fa84
+	| avr | avr32 \
01fa84
+	| be32 | be64 \
01fa84
 	| bfin \
01fa84
 	| c4x | clipper \
01fa84
 	| d10v | d30v | dlx | dsp16xx \
01fa84
+	| epiphany \
01fa84
 	| fido | fr30 | frv \
01fa84
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
01fa84
+	| hexagon \
01fa84
 	| i370 | i860 | i960 | ia64 \
01fa84
 	| ip2k | iq2000 \
01fa84
+	| le32 | le64 \
01fa84
 	| lm32 \
01fa84
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
01fa84
-	| maxq | mb | microblaze | mcore | mep | metag \
01fa84
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
01fa84
 	| mips | mipsbe | mipseb | mipsel | mipsle \
01fa84
 	| mips16 \
01fa84
 	| mips64 | mips64el \
01fa84
@@ -270,31 +286,45 @@
01fa84
 	| mipsisa64r2 | mipsisa64r2el \
01fa84
 	| mipsisa64sb1 | mipsisa64sb1el \
01fa84
 	| mipsisa64sr71k | mipsisa64sr71kel \
01fa84
+	| mipsr5900 | mipsr5900el \
01fa84
 	| mipstx39 | mipstx39el \
01fa84
 	| mn10200 | mn10300 \
01fa84
+	| moxie \
01fa84
 	| mt \
01fa84
 	| msp430 \
01fa84
-	| nios | nios2 \
01fa84
+	| nds32 | nds32le | nds32be \
01fa84
+	| nios | nios2 | nios2eb | nios2el \
01fa84
 	| ns16k | ns32k \
01fa84
-	| or32 \
01fa84
+	| open8 \
01fa84
+	| or1k | or32 \
01fa84
 	| pdp10 | pdp11 | pj | pjl \
01fa84
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
01fa84
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
01fa84
 	| pyramid \
01fa84
+	| rl78 | rx \
01fa84
 	| score \
01fa84
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
01fa84
 	| sh64 | sh64le \
01fa84
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
01fa84
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
01fa84
-	| spu | strongarm \
01fa84
-	| tahoe | thumb | tic4x | tic80 | tron \
01fa84
-	| v850 | v850e \
01fa84
+	| spu \
01fa84
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
01fa84
+	| ubicom32 \
01fa84
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
01fa84
 	| we32k \
01fa84
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
01fa84
+	| x86 | xc16x | xstormy16 | xtensa \
01fa84
 	| z8k | z80)
01fa84
 		basic_machine=$basic_machine-unknown
01fa84
 		;;
01fa84
-	m6811 | m68hc11 | m6812 | m68hc12)
01fa84
-		# Motorola 68HC11/12.
01fa84
+	c54x)
01fa84
+		basic_machine=tic54x-unknown
01fa84
+		;;
01fa84
+	c55x)
01fa84
+		basic_machine=tic55x-unknown
01fa84
+		;;
01fa84
+	c6x)
01fa84
+		basic_machine=tic6x-unknown
01fa84
+		;;
01fa84
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
01fa84
 		basic_machine=$basic_machine-unknown
01fa84
 		os=-none
01fa84
 		;;
01fa84
@@ -304,6 +334,21 @@
01fa84
 		basic_machine=mt-unknown
01fa84
 		;;
01fa84
 
01fa84
+	strongarm | thumb | xscale)
01fa84
+		basic_machine=arm-unknown
01fa84
+		;;
01fa84
+	xgate)
01fa84
+		basic_machine=$basic_machine-unknown
01fa84
+		os=-none
01fa84
+		;;
01fa84
+	xscaleeb)
01fa84
+		basic_machine=armeb-unknown
01fa84
+		;;
01fa84
+
01fa84
+	xscaleel)
01fa84
+		basic_machine=armel-unknown
01fa84
+		;;
01fa84
+
01fa84
 	# We use `pc' rather than `unknown'
01fa84
 	# because (1) that's what they normally are, and
01fa84
 	# (2) the word "unknown" tends to confuse beginning users.
01fa84
@@ -318,25 +363,30 @@
01fa84
 	# Recognize the basic CPU types with company name.
01fa84
 	580-* \
01fa84
 	| a29k-* \
01fa84
+	| aarch64-* | aarch64_be-* \
01fa84
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
01fa84
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
01fa84
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
01fa84
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
01fa84
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
01fa84
 	| avr-* | avr32-* \
01fa84
+	| be32-* | be64-* \
01fa84
 	| bfin-* | bs2000-* \
01fa84
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
01fa84
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
01fa84
 	| clipper-* | craynv-* | cydra-* \
01fa84
 	| d10v-* | d30v-* | dlx-* \
01fa84
 	| elxsi-* \
01fa84
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
01fa84
 	| h8300-* | h8500-* \
01fa84
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
01fa84
+	| hexagon-* \
01fa84
 	| i*86-* | i860-* | i960-* | ia64-* \
01fa84
 	| ip2k-* | iq2000-* \
01fa84
+	| le32-* | le64-* \
01fa84
 	| lm32-* \
01fa84
 	| m32c-* | m32r-* | m32rle-* \
01fa84
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
01fa84
 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
01fa84
+	| microblaze-* | microblazeel-* \
01fa84
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
01fa84
 	| mips16-* \
01fa84
 	| mips64-* | mips64el-* \
01fa84
@@ -354,28 +404,34 @@
01fa84
 	| mipsisa64r2-* | mipsisa64r2el-* \
01fa84
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
01fa84
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
01fa84
+	| mipsr5900-* | mipsr5900el-* \
01fa84
 	| mipstx39-* | mipstx39el-* \
01fa84
 	| mmix-* \
01fa84
 	| mt-* \
01fa84
 	| msp430-* \
01fa84
-	| nios-* | nios2-* \
01fa84
+	| nds32-* | nds32le-* | nds32be-* \
01fa84
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
01fa84
 	| none-* | np1-* | ns16k-* | ns32k-* \
01fa84
+	| open8-* \
01fa84
 	| orion-* \
01fa84
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
01fa84
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
01fa84
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
01fa84
 	| pyramid-* \
01fa84
-	| romp-* | rs6000-* \
01fa84
+	| rl78-* | romp-* | rs6000-* | rx-* \
01fa84
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
01fa84
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
01fa84
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
01fa84
 	| sparclite-* \
01fa84
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
01fa84
-	| tahoe-* | thumb-* \
01fa84
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
01fa84
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
01fa84
+	| tahoe-* \
01fa84
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
01fa84
+	| tile*-* \
01fa84
 	| tron-* \
01fa84
-	| v850-* | v850e-* | vax-* \
01fa84
+	| ubicom32-* \
01fa84
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
01fa84
+	| vax-* \
01fa84
 	| we32k-* \
01fa84
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
01fa84
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
01fa84
 	| xstormy16-* | xtensa*-* \
01fa84
 	| ymp-* \
01fa84
 	| z8k-* | z80-*)
01fa84
@@ -400,7 +456,7 @@
01fa84
 		basic_machine=a29k-amd
01fa84
 		os=-udi
01fa84
 		;;
01fa84
-    	abacus)
01fa84
+	abacus)
01fa84
 		basic_machine=abacus-unknown
01fa84
 		;;
01fa84
 	adobe68k)
01fa84
@@ -466,11 +522,24 @@
01fa84
 		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
 		os=-linux
01fa84
 		;;
01fa84
+	bluegene*)
01fa84
+		basic_machine=powerpc-ibm
01fa84
+		os=-cnk
01fa84
+		;;
01fa84
+	c54x-*)
01fa84
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
+		;;
01fa84
+	c55x-*)
01fa84
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
+		;;
01fa84
+	c6x-*)
01fa84
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
+		;;
01fa84
 	c90)
01fa84
 		basic_machine=c90-cray
01fa84
 		os=-unicos
01fa84
 		;;
01fa84
-        cegcc)
01fa84
+	cegcc)
01fa84
 		basic_machine=arm-unknown
01fa84
 		os=-cegcc
01fa84
 		;;
01fa84
@@ -502,7 +571,7 @@
01fa84
 		basic_machine=craynv-cray
01fa84
 		os=-unicosmp
01fa84
 		;;
01fa84
-	cr16)
01fa84
+	cr16 | cr16-*)
01fa84
 		basic_machine=cr16-unknown
01fa84
 		os=-elf
01fa84
 		;;
01fa84
@@ -660,7 +729,6 @@
01fa84
 	i370-ibm* | ibm*)
01fa84
 		basic_machine=i370-ibm
01fa84
 		;;
01fa84
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
01fa84
 	i*86v32)
01fa84
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
01fa84
 		os=-sysv32
01fa84
@@ -718,6 +786,13 @@
01fa84
 		basic_machine=ns32k-utek
01fa84
 		os=-sysv
01fa84
 		;;
01fa84
+	microblaze*)
01fa84
+		basic_machine=microblaze-xilinx
01fa84
+		;;
01fa84
+	mingw64)
01fa84
+		basic_machine=x86_64-pc
01fa84
+		os=-mingw64
01fa84
+		;;
01fa84
 	mingw32)
01fa84
 		basic_machine=i386-pc
01fa84
 		os=-mingw32
01fa84
@@ -754,10 +829,18 @@
01fa84
 	ms1-*)
01fa84
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
01fa84
 		;;
01fa84
+	msys)
01fa84
+		basic_machine=i386-pc
01fa84
+		os=-msys
01fa84
+		;;
01fa84
 	mvs)
01fa84
 		basic_machine=i370-ibm
01fa84
 		os=-mvs
01fa84
 		;;
01fa84
+	nacl)
01fa84
+		basic_machine=le32-unknown
01fa84
+		os=-nacl
01fa84
+		;;
01fa84
 	ncr3000)
01fa84
 		basic_machine=i486-ncr
01fa84
 		os=-sysv4
01fa84
@@ -822,6 +905,12 @@
01fa84
 	np1)
01fa84
 		basic_machine=np1-gould
01fa84
 		;;
01fa84
+	neo-tandem)
01fa84
+		basic_machine=neo-tandem
01fa84
+		;;
01fa84
+	nse-tandem)
01fa84
+		basic_machine=nse-tandem
01fa84
+		;;
01fa84
 	nsr-tandem)
01fa84
 		basic_machine=nsr-tandem
01fa84
 		;;
01fa84
@@ -904,9 +993,10 @@
01fa84
 		;;
01fa84
 	power)	basic_machine=power-ibm
01fa84
 		;;
01fa84
-	ppc)	basic_machine=powerpc-unknown
01fa84
+	ppc | ppcbe)	basic_machine=powerpc-unknown
01fa84
 		;;
01fa84
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
+	ppc-* | ppcbe-*)
01fa84
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
 		;;
01fa84
 	ppcle | powerpclittle | ppc-le | powerpc-little)
01fa84
 		basic_machine=powerpcle-unknown
01fa84
@@ -931,7 +1021,11 @@
01fa84
 		basic_machine=i586-unknown
01fa84
 		os=-pw32
01fa84
 		;;
01fa84
-	rdos)
01fa84
+	rdos | rdos64)
01fa84
+		basic_machine=x86_64-pc
01fa84
+		os=-rdos
01fa84
+		;;
01fa84
+	rdos32)
01fa84
 		basic_machine=i386-pc
01fa84
 		os=-rdos
01fa84
 		;;
01fa84
@@ -1000,6 +1094,9 @@
01fa84
 		basic_machine=i860-stratus
01fa84
 		os=-sysv4
01fa84
 		;;
01fa84
+	strongarm-* | thumb-*)
01fa84
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
01fa84
+		;;
01fa84
 	sun2)
01fa84
 		basic_machine=m68000-sun
01fa84
 		;;
01fa84
@@ -1056,20 +1153,8 @@
01fa84
 		basic_machine=t90-cray
01fa84
 		os=-unicos
01fa84
 		;;
01fa84
-	tic54x | c54x*)
01fa84
-		basic_machine=tic54x-unknown
01fa84
-		os=-coff
01fa84
-		;;
01fa84
-	tic55x | c55x*)
01fa84
-		basic_machine=tic55x-unknown
01fa84
-		os=-coff
01fa84
-		;;
01fa84
-	tic6x | c6x*)
01fa84
-		basic_machine=tic6x-unknown
01fa84
-		os=-coff
01fa84
-		;;
01fa84
 	tile*)
01fa84
-		basic_machine=tile-unknown
01fa84
+		basic_machine=$basic_machine-unknown
01fa84
 		os=-linux-gnu
01fa84
 		;;
01fa84
 	tx39)
01fa84
@@ -1139,6 +1224,9 @@
01fa84
 	xps | xps100)
01fa84
 		basic_machine=xps100-honeywell
01fa84
 		;;
01fa84
+	xscale-* | xscalee[bl]-*)
01fa84
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
01fa84
+		;;
01fa84
 	ymp)
01fa84
 		basic_machine=ymp-cray
01fa84
 		os=-unicos
01fa84
@@ -1236,9 +1324,12 @@
01fa84
 if [ x"$os" != x"" ]
01fa84
 then
01fa84
 case $os in
01fa84
-        # First match some system type aliases
01fa84
-        # that might get confused with valid system types.
01fa84
+	# First match some system type aliases
01fa84
+	# that might get confused with valid system types.
01fa84
 	# -solaris* is a basic system type, with this one exception.
01fa84
+	-auroraux)
01fa84
+		os=-auroraux
01fa84
+		;;
01fa84
 	-solaris1 | -solaris1.*)
01fa84
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
01fa84
 		;;
01fa84
@@ -1259,22 +1350,23 @@
01fa84
 	# Each alternative MUST END IN A *, to match a version number.
01fa84
 	# -sysv* is not here because it comes later, after sysvr4.
01fa84
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
01fa84
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
01fa84
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
01fa84
-	      | -kopensolaris* \
01fa84
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
01fa84
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
01fa84
+	      | -sym* | -kopensolaris* | -plan9* \
01fa84
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
01fa84
 	      | -aos* | -aros* \
01fa84
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
01fa84
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
01fa84
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
01fa84
-	      | -openbsd* | -solidbsd* \
01fa84
+	      | -bitrig* | -openbsd* | -solidbsd* \
01fa84
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
01fa84
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
01fa84
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
01fa84
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
01fa84
 	      | -chorusos* | -chorusrdb* | -cegcc* \
01fa84
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
01fa84
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
01fa84
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
01fa84
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
01fa84
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
01fa84
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
01fa84
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
01fa84
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
01fa84
@@ -1282,7 +1374,7 @@
01fa84
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
01fa84
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
01fa84
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
01fa84
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
01fa84
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
01fa84
 	# Remember, each alternative MUST END IN *, to match a version number.
01fa84
 		;;
01fa84
 	-qnx*)
01fa84
@@ -1321,7 +1413,7 @@
01fa84
 	-opened*)
01fa84
 		os=-openedition
01fa84
 		;;
01fa84
-        -os400*)
01fa84
+	-os400*)
01fa84
 		os=-os400
01fa84
 		;;
01fa84
 	-wince*)
01fa84
@@ -1370,7 +1462,7 @@
01fa84
 	-sinix*)
01fa84
 		os=-sysv4
01fa84
 		;;
01fa84
-        -tpf*)
01fa84
+	-tpf*)
01fa84
 		os=-tpf
01fa84
 		;;
01fa84
 	-triton*)
01fa84
@@ -1406,15 +1498,14 @@
01fa84
 	-aros*)
01fa84
 		os=-aros
01fa84
 		;;
01fa84
-	-kaos*)
01fa84
-		os=-kaos
01fa84
-		;;
01fa84
 	-zvmoe)
01fa84
 		os=-zvmoe
01fa84
 		;;
01fa84
 	-dicos*)
01fa84
 		os=-dicos
01fa84
 		;;
01fa84
+	-nacl*)
01fa84
+		;;
01fa84
 	-none)
01fa84
 		;;
01fa84
 	*)
01fa84
@@ -1437,10 +1528,10 @@
01fa84
 # system, and we'll never get to this point.
01fa84
 
01fa84
 case $basic_machine in
01fa84
-        score-*)
01fa84
+	score-*)
01fa84
 		os=-elf
01fa84
 		;;
01fa84
-        spu-*)
01fa84
+	spu-*)
01fa84
 		os=-elf
01fa84
 		;;
01fa84
 	*-acorn)
01fa84
@@ -1452,8 +1543,20 @@
01fa84
 	arm*-semi)
01fa84
 		os=-aout
01fa84
 		;;
01fa84
-        c4x-* | tic4x-*)
01fa84
-        	os=-coff
01fa84
+	c4x-* | tic4x-*)
01fa84
+		os=-coff
01fa84
+		;;
01fa84
+	hexagon-*)
01fa84
+		os=-elf
01fa84
+		;;
01fa84
+	tic54x-*)
01fa84
+		os=-coff
01fa84
+		;;
01fa84
+	tic55x-*)
01fa84
+		os=-coff
01fa84
+		;;
01fa84
+	tic6x-*)
01fa84
+		os=-coff
01fa84
 		;;
01fa84
 	# This must come before the *-dec entry.
01fa84
 	pdp10-*)
01fa84
@@ -1473,14 +1576,11 @@
01fa84
 		;;
01fa84
 	m68000-sun)
01fa84
 		os=-sunos3
01fa84
-		# This also exists in the configure program, but was not the
01fa84
-		# default.
01fa84
-		# os=-sunos4
01fa84
 		;;
01fa84
 	m68*-cisco)
01fa84
 		os=-aout
01fa84
 		;;
01fa84
-        mep-*)
01fa84
+	mep-*)
01fa84
 		os=-elf
01fa84
 		;;
01fa84
 	mips*-cisco)
01fa84
@@ -1489,6 +1589,9 @@
01fa84
 	mips*-*)
01fa84
 		os=-elf
01fa84
 		;;
01fa84
+	or1k-*)
01fa84
+		os=-elf
01fa84
+		;;
01fa84
 	or32-*)
01fa84
 		os=-coff
01fa84
 		;;
01fa84
@@ -1507,7 +1610,7 @@
01fa84
 	*-ibm)
01fa84
 		os=-aix
01fa84
 		;;
01fa84
-    	*-knuth)
01fa84
+	*-knuth)
01fa84
 		os=-mmixware
01fa84
 		;;
01fa84
 	*-wec)
01fa84
@@ -1612,7 +1715,7 @@
01fa84
 			-sunos*)
01fa84
 				vendor=sun
01fa84
 				;;
01fa84
-			-aix*)
01fa84
+			-cnk*|-aix*)
01fa84
 				vendor=ibm
01fa84
 				;;
01fa84
 			-beos*)
01fa84
Index: b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
01fa84
===================================================================
01fa84
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
01fa84
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
01fa84
@@ -238,6 +238,11 @@
01fa84
 
01fa84
 #endif
01fa84
 
01fa84
+/* CPU(AARCH64) - AArch64 */
01fa84
+#if defined(__aarch64__)
01fa84
+#define WTF_CPU_AARCH64 1
01fa84
+#endif
01fa84
+
01fa84
 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
01fa84
 
01fa84
 /* Set WTF_ARM_ARCH_VERSION */
01fa84
@@ -896,7 +901,7 @@
01fa84
 #endif
01fa84
 
01fa84
 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
01fa84
-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(S390X)
01fa84
+#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(S390X) || CPU(AARCH64)
01fa84
 #define WTF_USE_JSVALUE64 1
01fa84
 #elif CPU(ARM) || CPU(PPC64)
01fa84
 #define WTF_USE_JSVALUE32 1
01fa84
Index: b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
01fa84
===================================================================
01fa84
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
01fa84
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
01fa84
@@ -365,10 +365,15 @@
01fa84
 
01fa84
 #endif /* ARM */
01fa84
 
01fa84
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
01fa84
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(AARCH64)
01fa84
 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
01fa84
 #endif
01fa84
 
01fa84
+/* CPU(AARCH64) - Aarch64 */
01fa84
+#if defined(__aarch64__)
01fa84
+#define WTF_CPU_AARCH64 1
01fa84
+#endif
01fa84
+
01fa84
 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like 
01fa84
    virtual memory, not to choose a GUI toolkit ==== */
01fa84
 
01fa84
@@ -998,7 +1003,8 @@
01fa84
     || CPU(ALPHA) \
01fa84
     || CPU(SPARC64) \
01fa84
     || CPU(S390X) \
01fa84
-    || CPU(PPC64)
01fa84
+    || CPU(PPC64) \
01fa84
+    || CPU(AARCH64)
01fa84
 #define WTF_USE_JSVALUE64 1
01fa84
 #else
01fa84
 #define WTF_USE_JSVALUE32_64 1
01fa84
Index: b/src/corelib/arch/aarch64/arch.pri
01fa84
===================================================================
01fa84
--- /dev/null
01fa84
+++ b/src/corelib/arch/aarch64/arch.pri
01fa84
@@ -0,0 +1,4 @@
01fa84
+#
01fa84
+# AArch64 architecture
01fa84
+#
01fa84
+SOURCES += $$QT_ARCH_CPP/qatomic_aarch64.cpp
01fa84
Index: b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
01fa84
===================================================================
01fa84
--- /dev/null
01fa84
+++ b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
01fa84
@@ -0,0 +1,70 @@
01fa84
+/****************************************************************************
01fa84
+**
01fa84
+** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
01fa84
+** Contact: http://www.qt-project.org/legal
01fa84
+**
01fa84
+** This file is part of the QtCore module of the Qt Toolkit.
01fa84
+**
01fa84
+** $QT_BEGIN_LICENSE:LGPL$
01fa84
+** Commercial License Usage
01fa84
+** Licensees holding valid commercial Qt licenses may use this file in
01fa84
+** accordance with the commercial license agreement provided with the
01fa84
+** Software or, alternatively, in accordance with the terms contained in
01fa84
+** a written agreement between you and Digia.  For licensing terms and
01fa84
+** conditions see http://qt.digia.com/licensing.  For further information
01fa84
+** use the contact form at http://qt.digia.com/contact-us.
01fa84
+**
01fa84
+** GNU Lesser General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU Lesser
01fa84
+** General Public License version 2.1 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.LGPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU Lesser General Public License version 2.1 requirements
01fa84
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
01fa84
+**
01fa84
+** In addition, as a special exception, Digia gives you certain additional
01fa84
+** rights.  These rights are described in the Digia Qt LGPL Exception
01fa84
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
01fa84
+**
01fa84
+** GNU General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU
01fa84
+** General Public License version 3.0 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.GPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU General Public License version 3.0 requirements will be
01fa84
+** met: http://www.gnu.org/copyleft/gpl.html.
01fa84
+**
01fa84
+**
01fa84
+** $QT_END_LICENSE$
01fa84
+**
01fa84
+****************************************************************************/
01fa84
+
01fa84
+#include <QtCore/qglobal.h>
01fa84
+
01fa84
+#include <unistd.h>
01fa84
+#ifdef _POSIX_PRIORITY_SCHEDULING
01fa84
+# include <sched.h>
01fa84
+#endif
01fa84
+#include <time.h>
01fa84
+
01fa84
+QT_BEGIN_NAMESPACE
01fa84
+
01fa84
+QT_USE_NAMESPACE
01fa84
+
01fa84
+Q_CORE_EXPORT void qt_atomic_yield(int *count)
01fa84
+{
01fa84
+#ifdef _POSIX_PRIORITY_SCHEDULING
01fa84
+    if((*count)++ < 50) {
01fa84
+        sched_yield();
01fa84
+    } else
01fa84
+#endif
01fa84
+    {
01fa84
+        struct timespec tm;
01fa84
+        tm.tv_sec = 0;
01fa84
+        tm.tv_nsec = 2000001;
01fa84
+        nanosleep(&tm, NULL);
01fa84
+        *count = 0;
01fa84
+    }
01fa84
+}
01fa84
+
01fa84
+QT_END_NAMESPACE
01fa84
Index: b/src/corelib/arch/arch.pri
01fa84
===================================================================
01fa84
--- a/src/corelib/arch/arch.pri
01fa84
+++ b/src/corelib/arch/arch.pri
01fa84
@@ -31,7 +31,9 @@
01fa84
                        arch/qatomic_s390.h \
01fa84
                        arch/qatomic_x86_64.h \
01fa84
                        arch/qatomic_sh.h \
01fa84
-                       arch/qatomic_sh4a.h
01fa84
+                       arch/qatomic_sh4a.h \
01fa84
+                       arch/qatomic_aarch64.h \
01fa84
+
01fa84
 
01fa84
 QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
01fa84
 DEPENDPATH += $$QT_ARCH_CPP
01fa84
Index: b/src/corelib/arch/qatomic_aarch64.h
01fa84
===================================================================
01fa84
--- /dev/null
01fa84
+++ b/src/corelib/arch/qatomic_aarch64.h
01fa84
@@ -0,0 +1,335 @@
01fa84
+/****************************************************************************
01fa84
+**
01fa84
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
01fa84
+** Contact: http://www.qt-project.org/legal
01fa84
+**
01fa84
+** This file is part of the QtCore module of the Qt Toolkit.
01fa84
+**
01fa84
+** $QT_BEGIN_LICENSE:LGPL$
01fa84
+** Commercial License Usage
01fa84
+** Licensees holding valid commercial Qt licenses may use this file in
01fa84
+** accordance with the commercial license agreement provided with the
01fa84
+** Software or, alternatively, in accordance with the terms contained in
01fa84
+** a written agreement between you and Digia.  For licensing terms and
01fa84
+** conditions see http://qt.digia.com/licensing.  For further information
01fa84
+** use the contact form at http://qt.digia.com/contact-us.
01fa84
+**
01fa84
+** GNU Lesser General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU Lesser
01fa84
+** General Public License version 2.1 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.LGPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU Lesser General Public License version 2.1 requirements
01fa84
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
01fa84
+**
01fa84
+** In addition, as a special exception, Digia gives you certain additional
01fa84
+** rights.  These rights are described in the Digia Qt LGPL Exception
01fa84
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
01fa84
+**
01fa84
+** GNU General Public License Usage
01fa84
+** Alternatively, this file may be used under the terms of the GNU
01fa84
+** General Public License version 3.0 as published by the Free Software
01fa84
+** Foundation and appearing in the file LICENSE.GPL included in the
01fa84
+** packaging of this file.  Please review the following information to
01fa84
+** ensure the GNU General Public License version 3.0 requirements will be
01fa84
+** met: http://www.gnu.org/copyleft/gpl.html.
01fa84
+**
01fa84
+**
01fa84
+** $QT_END_LICENSE$
01fa84
+**
01fa84
+****************************************************************************/
01fa84
+
01fa84
+#ifndef QATOMIC_AARCH64_H
01fa84
+#define QATOMIC_AARCH64_H
01fa84
+
01fa84
+QT_BEGIN_HEADER
01fa84
+
01fa84
+QT_BEGIN_NAMESPACE
01fa84
+
01fa84
+#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+inline bool QBasicAtomicInt::isReferenceCountingNative()
01fa84
+{ return true; }
01fa84
+inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+inline bool QBasicAtomicInt::isTestAndSetNative()
01fa84
+{ return true; }
01fa84
+inline bool QBasicAtomicInt::isTestAndSetWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+inline bool QBasicAtomicInt::isFetchAndStoreNative()
01fa84
+{ return true; }
01fa84
+inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+inline bool QBasicAtomicInt::isFetchAndAddNative()
01fa84
+{ return true; }
01fa84
+inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
01fa84
+{ return true; }
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
01fa84
+{ return true; }
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
01fa84
+{ return true; }
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
01fa84
+{ return false; }
01fa84
+
01fa84
+#ifndef Q_DATA_MEMORY_BARRIER
01fa84
+# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
01fa84
+#endif
01fa84
+#ifndef Q_COMPILER_MEMORY_BARRIER
01fa84
+# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
01fa84
+#endif
01fa84
+
01fa84
+inline bool QBasicAtomicInt::ref()
01fa84
+{
01fa84
+    int newValue;
01fa84
+
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+
01fa84
+    return newValue != 0;
01fa84
+}
01fa84
+
01fa84
+inline bool QBasicAtomicInt::deref()
01fa84
+{
01fa84
+    int newValue;
01fa84
+
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+
01fa84
+    return newValue != 0;
01fa84
+}
01fa84
+
01fa84
+inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
01fa84
+{
01fa84
+    bool val;
01fa84
+
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val =  __atomic_compare_exchange_n (&_q_value, &expectedValue, &newValue,
01fa84
+					false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
01fa84
+{
01fa84
+    int val;
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
01fa84
+{
01fa84
+    int val;
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
01fa84
+{
01fa84
+    bool val;
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val =  __atomic_compare_exchange_n (&_q_value, &expectedValue, &newValue,
01fa84
+					false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
01fa84
+{
01fa84
+    T *val;
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
01fa84
+{
01fa84
+    T *val;
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return val;
01fa84
+}
01fa84
+
01fa84
+inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
01fa84
+{
01fa84
+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return testAndSetRelaxed(expectedValue, newValue);
01fa84
+}
01fa84
+
01fa84
+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
01fa84
+{
01fa84
+    int returnValue = fetchAndStoreRelaxed(newValue);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return fetchAndStoreRelaxed(newValue);
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    int returnValue = fetchAndStoreRelaxed(newValue);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
01fa84
+{
01fa84
+    int returnValue = fetchAndAddRelaxed(valueToAdd);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return fetchAndAddRelaxed(valueToAdd);
01fa84
+}
01fa84
+
01fa84
+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    int returnValue = fetchAndAddRelaxed(valueToAdd);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
01fa84
+{
01fa84
+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return testAndSetRelaxed(expectedValue, newValue);
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    bool returnValue = testAndSetAcquire(expectedValue, newValue);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
01fa84
+{
01fa84
+    T *returnValue = fetchAndStoreRelaxed(newValue);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return fetchAndStoreRelaxed(newValue);
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    T *returnValue = fetchAndStoreRelaxed(newValue);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
01fa84
+{
01fa84
+    T *returnValue = fetchAndAddRelaxed(valueToAdd);
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    return fetchAndAddRelaxed(valueToAdd);
01fa84
+}
01fa84
+
01fa84
+template <typename T>
01fa84
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
01fa84
+{
01fa84
+    Q_DATA_MEMORY_BARRIER;
01fa84
+    T *returnValue = fetchAndAddRelaxed(valueToAdd);
01fa84
+    Q_COMPILER_MEMORY_BARRIER;
01fa84
+    return returnValue;
01fa84
+}
01fa84
+
01fa84
+#undef Q_DATA_MEMORY_BARRIER
01fa84
+#undef Q_COMPILER_MEMORY_BARRIER
01fa84
+
01fa84
+QT_END_NAMESPACE
01fa84
+
01fa84
+QT_END_HEADER
01fa84
+
01fa84
+#endif // QATOMIC_AARCH64_H
01fa84
Index: b/src/corelib/arch/qatomic_arch.h
01fa84
===================================================================
01fa84
--- a/src/corelib/arch/qatomic_arch.h
01fa84
+++ b/src/corelib/arch/qatomic_arch.h
01fa84
@@ -92,6 +92,8 @@
01fa84
 #  include "QtCore/qatomic_sh4a.h"
01fa84
 #elif defined(QT_ARCH_NACL)
01fa84
 #  include "QtCore/qatomic_generic.h"
01fa84
+#elif defined(QT_ARCH_AARCH64)
01fa84
+#  include "QtCore/qatomic_aarch64.h"
01fa84
 #else
01fa84
 #  error "Qt has not been ported to this architecture"
01fa84
 #endif
01fa84
Index: b/src/corelib/io/qfilesystemwatcher_inotify.cpp
01fa84
===================================================================
01fa84
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
01fa84
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
01fa84
@@ -138,6 +138,11 @@
01fa84
 # define __NR_inotify_add_watch 285
01fa84
 # define __NR_inotify_rm_watch  286
01fa84
 # define __NR_inotify_init1     328
01fa84
+#elif defined (__aarch64__)
01fa84
+# define __NR_inotify_init1     26
01fa84
+# define __NR_inotify_add_watch 27
01fa84
+# define __NR_inotify_rm_watch  28
01fa84
+// no inotify_init for aarch64
01fa84
 #else
01fa84
 # error "This architecture is not supported. Please talk to qt-bugs@trolltech.com"
01fa84
 #endif
01fa84
@@ -155,7 +160,11 @@
01fa84
 
01fa84
 static inline int inotify_init()
01fa84
 {
01fa84
+#ifdef __NR_inotify_init
01fa84
     return syscall(__NR_inotify_init);
01fa84
+#else
01fa84
+    return syscall(__NR_inotify_init1, 0);
01fa84
+#endif
01fa84
 }
01fa84
 
01fa84
 static inline int inotify_add_watch(int fd, const char *name, __u32 mask)