1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
From a695eec2ef21240bbc6cd8cd1bdbab76f8da8dfd Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@synopsys.com>
Date: Wed, 20 May 2015 10:37:25 +0300
Subject: [PATCH 1/2] Add initial support of ARC architecture
DesignWare ARC 700 and ARC HS38 are families of 32-bit CPUs
developed by Synopsys, Inc.
This change implements following:
[1] Defines ARC as one embedded targets
[2] Defines default tools prefixed for ARC like
arc-linux-g++ etc
[3] Defines "inotify" syscall numbers for ARC
(note ARC fully compliant to Linux UAPI headers)
[4] Disables 16-bit aligned data access
For now we're using generic atomic ops even though it may
introduce performance panalty.
Change-Id: I91e879ac55c2f3643a544f97cd59671a81ccc3c2
This patch was submited in upstream Qt4 and if it ever gets accepted,
it should be removed from Buildroot.
https://codereview.qt-project.org/#/c/112667
---
configure | 6 ++++
mkspecs/qws/linux-arc-g++/qmake.conf | 21 ++++++++++++++
mkspecs/qws/linux-arc-g++/qplatformdefs.h | 42 +++++++++++++++++++++++++++
src/corelib/arch/qatomic_arch.h | 2 ++
src/corelib/io/qfilesystemwatcher_inotify.cpp | 5 ++++
src/gui/painting/qblendfunctions.cpp | 4 +--
6 files changed, 78 insertions(+), 2 deletions(-)
create mode 100644 mkspecs/qws/linux-arc-g++/qmake.conf
create mode 100644 mkspecs/qws/linux-arc-g++/qplatformdefs.h
diff --git a/configure b/configure
index 10ad7ca..c7ef074 100755
--- a/configure
+++ b/configure
@@ -2829,6 +2829,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
*86_64)
CFG_EMBEDDED=x86_64
;;
+ *arc)
+ CFG_EMBEDDED=arc
+ ;;
*)
CFG_EMBEDDED=generic
;;
@@ -3309,6 +3312,9 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
arm*)
CFG_ARCH=arm
;;
+ arc)
+ CFG_ARCH=arc
+ ;;
*)
CFG_ARCH="$CFG_EMBEDDED"
;;
diff --git a/mkspecs/qws/linux-arc-g++/qmake.conf b/mkspecs/qws/linux-arc-g++/qmake.conf
new file mode 100644
index 0000000..a14587b
--- /dev/null
+++ b/mkspecs/qws/linux-arc-g++/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for building with arc-linux-g++
+#
+
+include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arc-linux-gcc
+QMAKE_CXX = arc-linux-g++
+QMAKE_LINK = arc-linux-g++
+QMAKE_LINK_SHLIB = arc-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = arc-linux-ar cqs
+QMAKE_OBJCOPY = arc-linux-objcopy
+QMAKE_STRIP = arc-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-arc-g++/qplatformdefs.h b/mkspecs/qws/linux-arc-g++/qplatformdefs.h
new file mode 100644
index 0000000..a654aa7
--- /dev/null
+++ b/mkspecs/qws/linux-arc-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** 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 The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company 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"
diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
index d154b7e..a48c42a 100644
--- a/src/corelib/arch/qatomic_arch.h
+++ b/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_ARC)
+# include "QtCore/qatomic_generic.h"
#else
# error "Qt has not been ported to this architecture"
#endif
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 8bca422..e3e2565 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -143,6 +143,11 @@
# define __NR_inotify_add_watch 27
# define __NR_inotify_rm_watch 28
// no inotify_init for aarch64
+#elif defined (__arc__)
+# define __NR_inotify_init 1043
+# define __NR_inotify_add_watch 27
+# define __NR_inotify_rm_watch 28
+# define __NR_inotify_init1 26
#else
# error "This architecture is not supported. Please talk to qt-bugs@trolltech.com"
#endif
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index de8790a..cc2f5b6 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -309,9 +309,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
const uchar *src = srcPixels + y * sbpl;
const uchar *srcEnd = src + srcOffset;
while (src < srcEnd) {
-#if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) || (defined(QT_ARCH_INTEGRITY) && !defined(_X86_))
+#if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) || (defined(QT_ARCH_INTEGRITY) && !defined(_X86_)) || defined(QT_ARCH_ARC)
// non-16-bit aligned memory access is not possible on PowerPC,
- // ARM <v6 (QT_ARCH_ARMV5) & SH & AVR32 & SPARC w/GCC
+ // ARM <v6 (QT_ARCH_ARMV5) & SH & AVR32 & SPARC w/GCC & ARC
quint16 spix = (quint16(src[2])<<8) + src[1];
#else
quint16 spix = *(quint16 *) (src + 1);
--
2.1.0
|