Blame SOURCES/aarch64.patch

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