summaryrefslogtreecommitdiffstats
path: root/meta-boot2qt-distro/recipes-qt/qt5/qtbase/0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch
blob: ac4fe40add60ecb5efdd8f7ad9097e1b095e0676 (plain)
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
From 0386cb5f9a46e56a0a94f2a92e87ed52d41cf4ea Mon Sep 17 00:00:00 2001
From: David Schulz <david.schulz@theqtcompany.com>
Date: Fri, 3 Jul 2015 16:06:59 +0200
Subject: [PATCH] Add win32-g++-oe mkspec that uses the OE_ environment.

Upstream-Status: Inappropriate [embedded specific]
                 too OE specific, probably cannot be upstreamed

Change-Id: Ic60b32f88ee6a792b0d8938e40e2d6cb19fb93aa
---
 mkspecs/win32-g++-oe/qmake.conf      | 87 ++++++++++++++++++++++++++++++++++++
 mkspecs/win32-g++-oe/qplatformdefs.h | 42 +++++++++++++++++
 2 files changed, 129 insertions(+)
 create mode 100644 mkspecs/win32-g++-oe/qmake.conf
 create mode 100644 mkspecs/win32-g++-oe/qplatformdefs.h

diff --git a/mkspecs/win32-g++-oe/qmake.conf b/mkspecs/win32-g++-oe/qmake.conf
new file mode 100644
index 0000000..76eefe5
--- /dev/null
+++ b/mkspecs/win32-g++-oe/qmake.conf
@@ -0,0 +1,87 @@
+#
+# qmake configuration for win32-g++
+#
+# Written for MinGW / gcc 4.6 or higher
+#
+# Cross compile example for i686-w64-mingw32-g++:
+#   configure -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32-
+#
+
+load(device_config)
+include(../common/g++-base.conf)
+
+MAKEFILE_GENERATOR      = MINGW
+QMAKE_PLATFORM          = win32 mingw
+CONFIG                 += debug_and_release debug_and_release_target precompile_header
+DEFINES                += UNICODE
+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
+
+QMAKE_EXT_OBJ           = .o
+QMAKE_EXT_RES           = _res.o
+
+QMAKE_COMPILER          = $$(OE_QMAKE_COMPILER)
+
+QMAKE_CC                = $$(OE_QMAKE_CC)
+QMAKE_LEX               = flex
+QMAKE_LEXFLAGS          =
+QMAKE_YACC              = bison -y
+QMAKE_YACCFLAGS         = -d
+QMAKE_CFLAGS           += -fno-keep-inline-dllexport $$(OE_QMAKE_CFLAGS)
+QMAKE_CFLAGS_WARN_ON   += -Wextra
+QMAKE_CFLAGS_SSE2      += -mstackrealign
+
+QMAKE_CXX               = $$(OE_QMAKE_CXX)
+QMAKE_CXXFLAGS_THREAD   = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON  = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+
+QMAKE_INCDIR            =
+
+QMAKE_RUN_CC            = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP        = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX           = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_LINK              = $$(OE_QMAKE_LINK)
+QMAKE_LINK_C            = $$(OE_QMAKE_LINK)
+QMAKE_LFLAGS            = $$(OE_QMAKE_LDFLAGS)
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+QMAKE_LFLAGS_RELEASE    = -Wl,-s
+QMAKE_LFLAGS_CONSOLE    = -Wl,-subsystem,console
+QMAKE_LFLAGS_WINDOWS    = -Wl,-subsystem,windows
+QMAKE_LFLAGS_DLL        = -shared
+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+QMAKE_LINK_OBJECT_MAX   = 10
+QMAKE_LINK_OBJECT_SCRIPT = object_script
+QMAKE_PREFIX_SHLIB      =
+QMAKE_EXTENSION_SHLIB   = dll
+QMAKE_PREFIX_STATICLIB  = lib
+QMAKE_EXTENSION_STATICLIB = a
+QMAKE_LIB_EXTENSIONS    = a dll.a
+
+QMAKE_LIBS              =
+QMAKE_LIBS_CORE         = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
+QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+QMAKE_LIBS_NETWORK      = -lws2_32
+QMAKE_LIBS_OPENGL       = -lglu32 -lopengl32 -lgdi32 -luser32
+QMAKE_LIBS_OPENGL_ES2   = -lgdi32 -luser32
+QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32
+QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain
+
+QMAKE_IDL               = midl
+QMAKE_LIB               = $$(OE_QMAKE_AR) -rc
+QMAKE_RC                = $$(RC)
+
+QMAKE_STRIP             = $$(OE_QMAKE_STRIP)
+QMAKE_STRIPFLAGS_LIB   += --strip-unneeded
+QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
+QMAKE_NM                = $${CROSS_COMPILE}nm -P
+
+isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG)
+
+include(../common/angle.conf)
+include(../common/gcc-base.conf)
+
+load(qt_config)
diff --git a/mkspecs/win32-g++-oe/qplatformdefs.h b/mkspecs/win32-g++-oe/qplatformdefs.h
new file mode 100644
index 0000000..9d63527
--- /dev/null
+++ b/mkspecs/win32-g++-oe/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 "../win32-g++/qplatformdefs.h"