qt: split qt-host-tools + prepare cross
Separate the host tools from qt-devel for lighter cross compiling. Keep nocross=yes until the native builds are done.
This commit is contained in:
parent
5dc2824849
commit
32902f1fb0
|
@ -0,0 +1 @@
|
|||
qt
|
|
@ -1,28 +0,0 @@
|
|||
--- qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h 2015-05-07 14:14:45.000000000 +0000
|
||||
+++ qt-everywhere-opensource-src-4.8.7.patched/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h 2015-06-09 14:55:33.493388000 +0000
|
||||
@@ -369,6 +369,15 @@
|
||||
|
||||
#endif /* ARM */
|
||||
|
||||
+/* CPU(AARCH64) - AArch64 */
|
||||
+#if defined(__aarch64__)
|
||||
+#define WTF_CPU_AARCH64 1
|
||||
+#if defined(__AARCH64EB__)
|
||||
+#define WTF_CPU_BIG_ENDIAN 1
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
|
||||
#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
|
||||
#endif
|
||||
@@ -1003,7 +1012,8 @@
|
||||
|| CPU(SPARC64) \
|
||||
|| CPU(S390X) \
|
||||
|| CPU(PPC64) \
|
||||
- || CPU(MIPS64)
|
||||
+ || CPU(MIPS64) \
|
||||
+ || CPU(AARCH64)
|
||||
#define WTF_USE_JSVALUE64 1
|
||||
#else
|
||||
#define WTF_USE_JSVALUE32_64 1
|
|
@ -0,0 +1,541 @@
|
|||
--- qt.orig/configure 2017-01-13 19:15:45.711744577 +0100
|
||||
+++ qt/configure 2017-01-13 19:28:48.368861990 +0100
|
||||
@@ -2812,6 +2812,9 @@
|
||||
*86_64)
|
||||
PLATFORM=qws/linux-x86_64-g++
|
||||
;;
|
||||
+ aarch64)
|
||||
+ PLATFORM=qws/linux-aarch64-g++
|
||||
+ ;;
|
||||
*)
|
||||
PLATFORM=qws/linux-generic-g++
|
||||
;;
|
||||
@@ -3257,6 +3260,12 @@
|
||||
fi
|
||||
CFG_HOST_ARCH=arm
|
||||
;;
|
||||
+ *:*:aarch64*)
|
||||
+ if [ "$OPT_VERBOSE" = "yes" ]; then
|
||||
+ echo " AArch64 (aarch64)"
|
||||
+ fi
|
||||
+ CFG_HOST_ARCH=aarch64
|
||||
+ ;;
|
||||
Linux:*:sparc*)
|
||||
if [ "$OPT_VERBOSE" = "yes" ]; then
|
||||
echo " Linux on SPARC"
|
||||
--- /dev/null
|
||||
+++ qt/mkspecs/linux-aarch64-g++/qplatformdefs.h
|
||||
@@ -0,0 +1,42 @@
|
||||
+/****************************************************************************
|
||||
+**
|
||||
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
+** Contact: http://www.qt-project.org/legal
|
||||
+**
|
||||
+** This file is part of the qmake spec of the Qt Toolkit.
|
||||
+**
|
||||
+** $QT_BEGIN_LICENSE:LGPL$
|
||||
+** Commercial License Usage
|
||||
+** Licensees holding valid commercial Qt licenses may use this file in
|
||||
+** accordance with the commercial license agreement provided with the
|
||||
+** Software or, alternatively, in accordance with the terms contained in
|
||||
+** a written agreement between you and Digia. For licensing terms and
|
||||
+** conditions see http://qt.digia.com/licensing. For further information
|
||||
+** use the contact form at http://qt.digia.com/contact-us.
|
||||
+**
|
||||
+** GNU Lesser General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
+** General Public License version 2.1 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
+**
|
||||
+** In addition, as a special exception, Digia gives you certain additional
|
||||
+** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
+**
|
||||
+** GNU General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU
|
||||
+** General Public License version 3.0 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU General Public License version 3.0 requirements will be
|
||||
+** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
+**
|
||||
+**
|
||||
+** $QT_END_LICENSE$
|
||||
+**
|
||||
+****************************************************************************/
|
||||
+
|
||||
+#include "../linux-g++/qplatformdefs.h"
|
||||
--- /dev/null
|
||||
+++ qt/mkspecs/linux-aarch64-g++/qmake.conf
|
||||
@@ -0,0 +1,28 @@
|
||||
+#
|
||||
+# qmake configuration for linux-g++
|
||||
+#
|
||||
+# Written for GNU/Linux platforms that have both lib and lib64 directories,
|
||||
+# like the AMD Opteron.
|
||||
+#
|
||||
+
|
||||
+MAKEFILE_GENERATOR = UNIX
|
||||
+TARGET_PLATFORM = unix
|
||||
+TEMPLATE = app
|
||||
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
|
||||
+QT += core gui
|
||||
+QMAKE_INCREMENTAL_STYLE = sublib
|
||||
+
|
||||
+QMAKE_CFLAGS = -fpermissive
|
||||
+QMAKE_LFLAGS =
|
||||
+
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
+include(../common/linux.conf)
|
||||
+include(../common/gcc-base-unix.conf)
|
||||
+include(../common/g++-unix.conf)
|
||||
+
|
||||
+
|
||||
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
+
|
||||
+load(qt_config)
|
||||
--- /dev/null
|
||||
+++ qt/src/corelib/arch/aarch64/qatomic_aarch64.cpp
|
||||
@@ -0,0 +1,70 @@
|
||||
+/****************************************************************************
|
||||
+**
|
||||
+** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
+** Contact: http://www.qt-project.org/legal
|
||||
+**
|
||||
+** This file is part of the QtCore module of the Qt Toolkit.
|
||||
+**
|
||||
+** $QT_BEGIN_LICENSE:LGPL$
|
||||
+** Commercial License Usage
|
||||
+** Licensees holding valid commercial Qt licenses may use this file in
|
||||
+** accordance with the commercial license agreement provided with the
|
||||
+** Software or, alternatively, in accordance with the terms contained in
|
||||
+** a written agreement between you and Digia. For licensing terms and
|
||||
+** conditions see http://qt.digia.com/licensing. For further information
|
||||
+** use the contact form at http://qt.digia.com/contact-us.
|
||||
+**
|
||||
+** GNU Lesser General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
+** General Public License version 2.1 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
+**
|
||||
+** In addition, as a special exception, Digia gives you certain additional
|
||||
+** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
+**
|
||||
+** GNU General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU
|
||||
+** General Public License version 3.0 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU General Public License version 3.0 requirements will be
|
||||
+** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
+**
|
||||
+**
|
||||
+** $QT_END_LICENSE$
|
||||
+**
|
||||
+****************************************************************************/
|
||||
+
|
||||
+#include <QtCore/qglobal.h>
|
||||
+
|
||||
+#include <unistd.h>
|
||||
+#ifdef _POSIX_PRIORITY_SCHEDULING
|
||||
+# include <sched.h>
|
||||
+#endif
|
||||
+#include <time.h>
|
||||
+
|
||||
+QT_BEGIN_NAMESPACE
|
||||
+
|
||||
+QT_USE_NAMESPACE
|
||||
+
|
||||
+Q_CORE_EXPORT void qt_atomic_yield(int *count)
|
||||
+{
|
||||
+#ifdef _POSIX_PRIORITY_SCHEDULING
|
||||
+ if((*count)++ < 50) {
|
||||
+ sched_yield();
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
+ struct timespec tm;
|
||||
+ tm.tv_sec = 0;
|
||||
+ tm.tv_nsec = 2000001;
|
||||
+ nanosleep(&tm, NULL);
|
||||
+ *count = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+QT_END_NAMESPACE
|
||||
--- qt.orig/src/corelib/arch/arch.pri
|
||||
+++ qt/src/corelib/arch/arch.pri
|
||||
@@ -31,7 +31,9 @@ integrity:HEADERS += arch/qatomic_integr
|
||||
arch/qatomic_s390.h \
|
||||
arch/qatomic_x86_64.h \
|
||||
arch/qatomic_sh.h \
|
||||
- arch/qatomic_sh4a.h
|
||||
+ arch/qatomic_sh4a.h \
|
||||
+ arch/qatomic_aarch64.h \
|
||||
+
|
||||
|
||||
QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
|
||||
DEPENDPATH += $$QT_ARCH_CPP
|
||||
--- /dev/null
|
||||
+++ qt/include/QtCore/qatomic_aarch64.h
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../../src/corelib/arch/qatomic_aarch64.h"
|
||||
--- /dev/null
|
||||
+++ qt/src/corelib/arch/qatomic_aarch64.h
|
||||
@@ -0,0 +1,335 @@
|
||||
+/****************************************************************************
|
||||
+**
|
||||
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
+** Contact: http://www.qt-project.org/legal
|
||||
+**
|
||||
+** This file is part of the QtCore module of the Qt Toolkit.
|
||||
+**
|
||||
+** $QT_BEGIN_LICENSE:LGPL$
|
||||
+** Commercial License Usage
|
||||
+** Licensees holding valid commercial Qt licenses may use this file in
|
||||
+** accordance with the commercial license agreement provided with the
|
||||
+** Software or, alternatively, in accordance with the terms contained in
|
||||
+** a written agreement between you and Digia. For licensing terms and
|
||||
+** conditions see http://qt.digia.com/licensing. For further information
|
||||
+** use the contact form at http://qt.digia.com/contact-us.
|
||||
+**
|
||||
+** GNU Lesser General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
+** General Public License version 2.1 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
+**
|
||||
+** In addition, as a special exception, Digia gives you certain additional
|
||||
+** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
+**
|
||||
+** GNU General Public License Usage
|
||||
+** Alternatively, this file may be used under the terms of the GNU
|
||||
+** General Public License version 3.0 as published by the Free Software
|
||||
+** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
+** packaging of this file. Please review the following information to
|
||||
+** ensure the GNU General Public License version 3.0 requirements will be
|
||||
+** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
+**
|
||||
+**
|
||||
+** $QT_END_LICENSE$
|
||||
+**
|
||||
+****************************************************************************/
|
||||
+
|
||||
+#ifndef QATOMIC_AARCH64_H
|
||||
+#define QATOMIC_AARCH64_H
|
||||
+
|
||||
+QT_BEGIN_HEADER
|
||||
+
|
||||
+QT_BEGIN_NAMESPACE
|
||||
+
|
||||
+#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+inline bool QBasicAtomicInt::isReferenceCountingNative()
|
||||
+{ return true; }
|
||||
+inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+inline bool QBasicAtomicInt::isTestAndSetNative()
|
||||
+{ return true; }
|
||||
+inline bool QBasicAtomicInt::isTestAndSetWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+inline bool QBasicAtomicInt::isFetchAndStoreNative()
|
||||
+{ return true; }
|
||||
+inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+inline bool QBasicAtomicInt::isFetchAndAddNative()
|
||||
+{ return true; }
|
||||
+inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
|
||||
+{ return true; }
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
|
||||
+{ return true; }
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
|
||||
+{ return true; }
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
|
||||
+{ return false; }
|
||||
+
|
||||
+#ifndef Q_DATA_MEMORY_BARRIER
|
||||
+# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
|
||||
+#endif
|
||||
+#ifndef Q_COMPILER_MEMORY_BARRIER
|
||||
+# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
|
||||
+#endif
|
||||
+
|
||||
+inline bool QBasicAtomicInt::ref()
|
||||
+{
|
||||
+ int newValue;
|
||||
+
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+
|
||||
+ return newValue != 0;
|
||||
+}
|
||||
+
|
||||
+inline bool QBasicAtomicInt::deref()
|
||||
+{
|
||||
+ int newValue;
|
||||
+
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+
|
||||
+ return newValue != 0;
|
||||
+}
|
||||
+
|
||||
+inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
+{
|
||||
+ bool val;
|
||||
+
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
|
||||
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
+{
|
||||
+ int val;
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
+{
|
||||
+ int val;
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
+{
|
||||
+ bool val;
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
|
||||
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
+{
|
||||
+ T *val;
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
|
||||
+{
|
||||
+ T *val;
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
+{
|
||||
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return testAndSetRelaxed(expectedValue, newValue);
|
||||
+}
|
||||
+
|
||||
+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
+{
|
||||
+ int returnValue = fetchAndStoreRelaxed(newValue);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return fetchAndStoreRelaxed(newValue);
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ int returnValue = fetchAndStoreRelaxed(newValue);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
+{
|
||||
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return fetchAndAddRelaxed(valueToAdd);
|
||||
+}
|
||||
+
|
||||
+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
|
||||
+{
|
||||
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return testAndSetRelaxed(expectedValue, newValue);
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ bool returnValue = testAndSetAcquire(expectedValue, newValue);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
+{
|
||||
+ T *returnValue = fetchAndStoreRelaxed(newValue);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return fetchAndStoreRelaxed(newValue);
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ T *returnValue = fetchAndStoreRelaxed(newValue);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
|
||||
+{
|
||||
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ return fetchAndAddRelaxed(valueToAdd);
|
||||
+}
|
||||
+
|
||||
+template <typename T>
|
||||
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
|
||||
+{
|
||||
+ Q_DATA_MEMORY_BARRIER;
|
||||
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
|
||||
+ Q_COMPILER_MEMORY_BARRIER;
|
||||
+ return returnValue;
|
||||
+}
|
||||
+
|
||||
+#undef Q_DATA_MEMORY_BARRIER
|
||||
+#undef Q_COMPILER_MEMORY_BARRIER
|
||||
+
|
||||
+QT_END_NAMESPACE
|
||||
+
|
||||
+QT_END_HEADER
|
||||
+
|
||||
+#endif // QATOMIC_AARCH64_H
|
||||
--- qt.orig/src/corelib/arch/qatomic_arch.h
|
||||
+++ qt/src/corelib/arch/qatomic_arch.h
|
||||
@@ -94,6 +94,8 @@ QT_BEGIN_HEADER
|
||||
# include "QtCore/qatomic_sh4a.h"
|
||||
#elif defined(QT_ARCH_NACL)
|
||||
# include "QtCore/qatomic_generic.h"
|
||||
+#elif defined(QT_ARCH_AARCH64)
|
||||
+# include "QtCore/qatomic_aarch64.h"
|
||||
#else
|
||||
# error "Qt has not been ported to this architecture"
|
||||
#endif
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'qt'
|
||||
pkgname=qt
|
||||
version=4.8.7
|
||||
revision=14
|
||||
revision=15
|
||||
_distname=qt-everywhere-opensource-src
|
||||
patch_args="-Np1"
|
||||
wrksrc=${_distname}-${version}
|
||||
|
@ -11,51 +11,159 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|||
license="GPL-3, LGPL-2.1"
|
||||
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/${_distname}-${version}.tar.gz"
|
||||
checksum=e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0
|
||||
nocross=yes # WIP: next step is to remove this line
|
||||
|
||||
nocross=yes
|
||||
hostmakedepends="sqlite pkg-config"
|
||||
hostmakedepends="perl sqlite pkg-config"
|
||||
makedepends="
|
||||
libressl-devel libpng-devel MesaLib-devel libXrender-devel unixodbc-devel
|
||||
fontconfig-devel libXi-devel libXv-devel libXinerama-devel libXrandr-devel
|
||||
libXcursor-devel dbus-devel glib-devel icu-devel cups-devel libjpeg-turbo-devel
|
||||
sqlite-devel alsa-lib-devel tiff-devel libmng-devel libxshmfence-devel
|
||||
libSM-devel gtk+-devel libmysqlclient-devel postgresql-libs-devel
|
||||
pulseaudio-devel"
|
||||
MesaLib-devel libressl-devel unixodbc-devel libXv-devel libXinerama-devel
|
||||
libXrandr-devel libXcursor-devel glib-devel icu-devel cups-devel sqlite-devel
|
||||
alsa-lib-devel libmng-devel libSM-devel gtk+-devel libnotify-devel
|
||||
libmysqlclient-devel postgresql-libs-devel pulseaudio-devel"
|
||||
depends="qtchooser hicolor-icon-theme icu-libs"
|
||||
replaces="qt-qtconfig>=0"
|
||||
|
||||
CXXFLAGS="-std=gnu++98 -Wno-deprecated"
|
||||
CXXFLAGS="-std=gnu++98 -Wno-deprecated -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" qt-qmake qt-host-tools"
|
||||
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib"
|
||||
fi
|
||||
|
||||
do_configure() {
|
||||
local _libdir _opts
|
||||
local _opts _spec
|
||||
|
||||
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
|
||||
export LD="$CXX"
|
||||
|
||||
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
||||
_libdir=lib32
|
||||
else
|
||||
_libdir=lib
|
||||
fi
|
||||
|
||||
# qmake CFLAGS/LDFLAGS
|
||||
sed -i -e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ QMAKE_CFLAGS="$CFLAGS" QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_LFLAGS="$LDFLAGS" )/' \
|
||||
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
||||
configure
|
||||
|
||||
_opts="-confirm-license"
|
||||
_opts+=" -confirm-license"
|
||||
_opts+=" -opensource"
|
||||
_opts+=" -prefix /usr"
|
||||
_opts+=" -sysconfdir /etc"
|
||||
_opts+=" -bindir /usr/lib/qt/bin"
|
||||
_opts+=" -datadir /usr/share/qt"
|
||||
_opts+=" -docdir /usr/share/doc/qt"
|
||||
_opts+=" -plugindir /usr/${_libdir}/qt/plugins"
|
||||
_opts+=" -plugindir /usr/lib/qt/plugins"
|
||||
_opts+=" -importdir /usr/lib/qt/imports"
|
||||
_opts+=" -translationdir /usr/share/qt/translations"
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
_opts+=" -force-pkg-config"
|
||||
_opts+=" -continue"
|
||||
_opts+=" -xplatform ${CXX}"
|
||||
_opts+=" -exceptions"
|
||||
_opts+=" -make libs"
|
||||
_opts+=" -make tools"
|
||||
_opts+=" -make docs"
|
||||
_opts+=" -make translations"
|
||||
_opts+=" -qt3support"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5tel)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="arm-linux-gnueabi-c++"
|
||||
;;
|
||||
armv6l)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="arm-linux-gnueabihf-c++"
|
||||
;;
|
||||
armv6l-musl)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="arm-linux-musleabihf-c++"
|
||||
;;
|
||||
armv7l)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="armv7l-linux-gnueabihf-c++"
|
||||
;;
|
||||
armv7l-musl)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="armv7l-linux-musleabihf-c++"
|
||||
;;
|
||||
aarch64)
|
||||
_opts+=" -embedded aarch64"
|
||||
_spec="aarch64-linux-gnu-c++"
|
||||
;;
|
||||
aarch64-musl)
|
||||
_opts+=" -embedded aarch64"
|
||||
_spec="aarch64-linux-musl-c++"
|
||||
;;
|
||||
mips-musl)
|
||||
_opts+=" -embedded mips"
|
||||
_spec="mips-linux-musl-c++"
|
||||
;;
|
||||
mipsel-musl)
|
||||
_opts+=" -embedded mips"
|
||||
_spec="mipsel-linux-musl-c++"
|
||||
;;
|
||||
mipselhf-musl)
|
||||
_opts+=" -embedded mips"
|
||||
_spec="mipsel-linux-muslhf-c++"
|
||||
;;
|
||||
*-musl)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="${XBPS_TARGET_MACHINE}-linux-musl-c++"
|
||||
;;
|
||||
*)
|
||||
_opts+=" -embedded arm"
|
||||
_spec="${XBPS_TARGET_MACHINE}-linux-gnu-c++"
|
||||
;;
|
||||
esac
|
||||
mkdir mkspecs/${_spec}
|
||||
cat > mkspecs/${_spec}/qmake.conf << _EOF
|
||||
#
|
||||
# qmake specification for ${XBPS_TARGET_MACHINE}-linux-gnu-c++
|
||||
#
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
TARGET_PLATFORM = unix
|
||||
TEMPLATE = app
|
||||
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
|
||||
QT += core gui
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
QMAKE_CC = ${CC}
|
||||
QMAKE_LINK_C = ${CC}
|
||||
QMAKE_LINK_C_SHLIB = ${CC}
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
|
||||
QMAKE_CXX = ${CXX}
|
||||
QMAKE_LINK = ${CXX}
|
||||
QMAKE_LINK_SHLIB = ${CXX}
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
|
||||
QMAKE_PCH_OUTPUT_EXT = .gch
|
||||
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c \${QMAKE_PCH_INPUT} -o \${QMAKE_PCH_OUTPUT}
|
||||
QMAKE_CFLAGS_USE_PRECOMPILE = -include \${QMAKE_PCH_OUTPUT_BASE}
|
||||
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c \${QMAKE_PCH_INPUT} -o \${QMAKE_PCH_OUTPUT}
|
||||
QMAKE_CXXFLAGS_USE_PRECOMPILE = -include \${QMAKE_PCH_OUTPUT_BASE}
|
||||
QMAKE_LFLAGS_RELEASE += -Wl,-O1 -Wl,-rpath,${wrksrc}/lib
|
||||
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
|
||||
|
||||
load(qt_config)
|
||||
_EOF
|
||||
cat > mkspecs/${_spec}/qplatformdefs.h << _EOF
|
||||
#include "../linux-g++/qplatformdefs.h"
|
||||
_EOF
|
||||
|
||||
# Force enable qfilesystemwatcher_{i,d}notify
|
||||
cat >> src/corelib/io/io.pri << _EOF
|
||||
SOURCES += io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_dnotify.cpp
|
||||
HEADERS += io/qfilesystemwatcher_inotify_p.h io/qfilesystemwatcher_dnotify_p.h
|
||||
_EOF
|
||||
|
||||
# qmake CFLAGS/LDFLAGS
|
||||
sed -i configure \
|
||||
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ CC=gcc CXX=g++ LINK=g++ QMAKE_CFLAGS="$XBPS_CFLAGS" QMAKE_CXXFLAGS="$XBPS_CXXFLAGS" QMAKE_LFLAGS="$XBPS_LDFLAGS" )/' \
|
||||
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
||||
-e 's/5\*\|4\*\|3\.4\*)/6*|&/'
|
||||
export PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig:${XBPS_CROSS_BASE}/usr/share/pkgconfig
|
||||
export PKG_CONFIG_LIBDIR=${XBPS_CROSS_BASE}/usr/lib/pkgconfig
|
||||
export PKG_CONFIG_SYSROOT_DIR=${XBPS_CROSS_BASE}
|
||||
|
||||
else
|
||||
_opts+=" -graphicssystem raster"
|
||||
# qmake CFLAGS/LDFLAGS
|
||||
sed -i -e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ QMAKE_CFLAGS="$CFLAGS" QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_LFLAGS="$LDFLAGS" )/' \
|
||||
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
|
||||
configure
|
||||
fi
|
||||
|
||||
_opts+=" -nomake demos"
|
||||
_opts+=" -nomake examples"
|
||||
_opts+=" -graphicssystem raster"
|
||||
_opts+=" -openssl-linked"
|
||||
_opts+=" -xmlpatterns"
|
||||
_opts+=" -no-webkit"
|
||||
|
@ -71,13 +179,36 @@ do_configure() {
|
|||
_opts+=" -dbus-linked"
|
||||
_opts+=" -v"
|
||||
|
||||
echo "./configure ${_opts}"
|
||||
echo "=== ./configure ${_opts}"
|
||||
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
|
||||
export LD="$CXX"
|
||||
export QMAKE_CFLAGS="${CFLAGS}"
|
||||
export QMAKE_CXXFLAGS="${CXXFLAGS}"
|
||||
export QMAKE_LFLAGS="${LDFLAGS}"
|
||||
export QMAKE_LFLAGS="${LDFLAGS} -Wl,-rpath,${wrksrc}/lib"
|
||||
./configure ${_opts}
|
||||
}
|
||||
do_build() {
|
||||
local _f
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
# Replace binaries for host
|
||||
find -name Makefile\* -exec sed -i "{}" -e"s;/builddir/.*/bin/;/usr/lib/qt/bin/;g" \;
|
||||
# Build qmake for the target
|
||||
echo "=== Building qmake for the target ${XBPS_TARGET_MACHINE}"
|
||||
mv bin/qmake{,-host}
|
||||
sed -i qmake/Makefile \
|
||||
-e"s;^\(CC =\).*;\1 ${CC};" \
|
||||
-e"s;^\(CXX =\).*;\1 ${CXX};" \
|
||||
-e"s;^\(QMAKE_CFLAGS =\).*;\1 ${CFLAGS};" \
|
||||
-e"s;^\(QMAKE_CXXFLAGS =\).*;\1 ${CXXFLAGS};" \
|
||||
-e"s;^\(QMAKE_LFLAGS =\).*;\1 ${LDFLAGS};"
|
||||
cd qmake
|
||||
make clean
|
||||
make ${makejobs}
|
||||
cd ${wrksrc}
|
||||
mv bin/qmake{,-target}
|
||||
mv bin/qmake{-host,}
|
||||
cd ${wrksrc}
|
||||
fi
|
||||
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
|
||||
export LD="$CXX"
|
||||
make ${makejobs}
|
||||
|
@ -117,6 +248,12 @@ do_install() {
|
|||
|
||||
# Remove wrong stuff
|
||||
rm -rf ${DESTDIR}/usr/{examples,demos}
|
||||
|
||||
# For a cross build replace qmake with the target binary
|
||||
if [ -f ${wrksrc}/bin/qmake-target ]; then
|
||||
mv ${wrksrc}/bin/qmake-target ${DESTDIR}/usr/lib/qt/bin/qmake
|
||||
ln -s /usr/lib/qt/bin/qmake ${DESTDIR}/usr/bin/qmake-qt4
|
||||
fi
|
||||
}
|
||||
|
||||
qt-doc_package() {
|
||||
|
@ -154,6 +291,18 @@ qt-designer-devel_package() {
|
|||
vmove usr/lib/libQtDesignerComponents.so
|
||||
}
|
||||
}
|
||||
qt-host-tools_package() {
|
||||
depends"qt"
|
||||
short_desc+=" - host tools"
|
||||
pkg_install() {
|
||||
for f in lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qt3to4 \
|
||||
rcc uic uic3; do
|
||||
if [ -f "${DESTDIR}/usr/lib/qt/bin/${f}" ]; then
|
||||
vmove usr/lib/qt/bin/${f}
|
||||
fi
|
||||
done
|
||||
}
|
||||
}
|
||||
qt-devel-tools_package() {
|
||||
depends="hicolor-icon-theme"
|
||||
short_desc+=" - development tools"
|
||||
|
@ -161,8 +310,10 @@ qt-devel-tools_package() {
|
|||
for f in assistant lconvert linguist pixeltool qcollectiongenerator \
|
||||
qhelpgenerator qhelpconverter xmlpatterns xmlpatternsvalidator \
|
||||
qttracereplay qdoc3 qmlviewer; do
|
||||
vmove usr/bin/${f}-qt4
|
||||
vmove usr/lib/qt/bin/${f}
|
||||
if [ -f "${DESTDIR}/usr/lib/qt/bin/${f}" ]; then
|
||||
vmove usr/bin/${f}-qt4
|
||||
vmove usr/lib/qt/bin/${f}
|
||||
fi
|
||||
done
|
||||
vmove usr/share/icons/hicolor
|
||||
for f in linguist assistant; do
|
||||
|
@ -174,13 +325,14 @@ qt-devel-tools_package() {
|
|||
}
|
||||
}
|
||||
qt-devel_package() {
|
||||
depends="qt-qmake qt-devel-tools libX11-devel icu-devel qt>=${version}_${revision}"
|
||||
depends="qt-qmake qt-devel-tools qt-host-tools libX11-devel icu-devel qt>=${version}_${revision}"
|
||||
short_desc+=" - development files"
|
||||
pkg_install() {
|
||||
for f in lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qt3to4 \
|
||||
rcc uic uic3; do
|
||||
vmove usr/bin/${f}-qt4
|
||||
vmove usr/lib/qt/bin/${f}
|
||||
if [ -f "${DESTDIR}/usr/bin/${f}-qt4" ]; then
|
||||
vmove usr/bin/${f}-qt4
|
||||
fi
|
||||
done
|
||||
vmove usr/include
|
||||
vmove "usr/lib/*.a"
|
||||
|
|
Loading…
Reference in New Issue