summaryrefslogtreecommitdiffstats
path: root/mkspecs/symbian-gcce
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/symbian-gcce')
-rw-r--r--mkspecs/symbian-gcce/features/default_post.prf5
-rw-r--r--mkspecs/symbian-gcce/qmake.conf92
-rw-r--r--mkspecs/symbian-gcce/qplatformdefs.h43
3 files changed, 140 insertions, 0 deletions
diff --git a/mkspecs/symbian-gcce/features/default_post.prf b/mkspecs/symbian-gcce/features/default_post.prf
new file mode 100644
index 0000000..7aa1f4d
--- /dev/null
+++ b/mkspecs/symbian-gcce/features/default_post.prf
@@ -0,0 +1,5 @@
+load(default_post.prf)
+
+# It is important that this config be executed last,
+# and qmake does them in reverse order.
+CONFIG = symbian_building $$CONFIG
diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf
new file mode 100644
index 0000000..62a079b
--- /dev/null
+++ b/mkspecs/symbian-gcce/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for symbian-gcce
+#
+
+include(../common/symbian/symbian-makefile.conf)
+
+include(../common/g++.conf)
+
+QMAKE_CC = arm-none-symbianelf-gcc
+QMAKE_CXX = arm-none-symbianelf-g++
+QMAKE_LINK = arm-none-symbianelf-ld
+QMAKE_LINK_SHLIB = arm-none-symbianelf-ld
+QMAKE_LINK_C = arm-none-symbianelf-ld
+QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld
+QMAKE_AR = arm-none-symbianelf-ar cqs
+
+# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible
+# notice that the middle part of the following set of vars matches the TARGET content of the libs
+
+QMAKE_qtmain_CXXFLAGS = -mthumb
+QMAKE_QtCore_CXXFLAGS = -mthumb
+QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+QMAKE_QtDBus_CXXFLAGS = -mthumb
+QMAKE_QtDeclarative_CXXFLAGS = -mthumb
+QMAKE_QtMultimedia_CXXFLAGS = -mthumb
+QMAKE_QtNetwork_CXXFLAGS = -mthumb
+QMAKE_QtOpenGL_CXXFLAGS = -mthumb
+QMAKE_QtOpenVG_CXXFLAGS = -mthumb
+QMAKE_phonon_CXXFLAGS = -mthumb
+QMAKE_QtScript_CXXFLAGS = -mthumb
+QMAKE_QtScriptTools_CXXFLAGS = -mthumb
+QMAKE_QtSql_CXXFLAGS = -mthumb
+QMAKE_QtSvg_CXXFLAGS = -mthumb
+QMAKE_QtTest_CXXFLAGS = -mthumb
+QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb
+QMAKE_QtXml_CXXFLAGS = -mthumb
+#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b]
+QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+
+# never use -fPIC, gcce-linker doesn't like it.
+# g++ conf above adds it if the host platform is 64 bit, so we remove it again
+QMAKE_CFLAGS_SHLIB -= -fPIC
+QMAKE_CFLAGS_STATIC_LIB -= -fPIC
+QMAKE_CXXFLAGS_SHLIB -= -fPIC
+QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC
+
+QMAKE_LFLAGS_SONAME =
+#QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_NOUNDEF =
+QMAKE_LFLAGS_RPATH = --rpath=
+
+DEFINES += __GCCE__ \
+ UNICODE
+
+QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup
+QMAKE_LFLAGS_SHLIB += -shared --default-symver --entry=_E32Dll -u _E32Dll
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+
+gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script
+QMAKE_CFLAGS += $${gcceExtraFlags}
+QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden
+#If we are not going to link to Qt or qtmain.lib, we need to include this at least once.
+isEmpty(QT):contains(TEMPLATE, app) {
+ QMAKE_CXXFLAGS += --include=$${EPOCROOT}epoc32/include/stdapis/staticlibinit_gcce.h
+}
+
+QMAKE_LFLAGS += --target1-abs \
+ --no-undefined \
+ --nostdlib
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb/
+
+# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
+QMAKE_GCC_SEARCH_DIRS = $$system($$QMAKE_CXX -print-search-dirs)
+QMAKE_GCC_SEARCH_DIRS = "$$join(QMAKE_GCC_SEARCH_DIRS, " ")"
+QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, ".*libraries: *", "")
+QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, "=", "")
+contains(QMAKE_HOST.os,Windows) {
+ QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, ;)
+} else {
+ QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, :)
+}
+for(line, QMAKE_GCC_SEARCH_DIRS):QMAKE_LIBDIR += $$line
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
+
+INCLUDEPATH = $${EPOCROOT}epoc32/include/ \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $${EPOCROOT}epoc32/include/gcce \
+ $$INCLUDEPATH
+
diff --git a/mkspecs/symbian-gcce/qplatformdefs.h b/mkspecs/symbian-gcce/qplatformdefs.h
new file mode 100644
index 0000000..9d95a37
--- /dev/null
+++ b/mkspecs/symbian-gcce/qplatformdefs.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the mkspecs of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../common/symbian/qplatformdefs.h"
+