summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-02-25 13:01:59 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-02-25 13:01:59 (GMT)
commitcef67062373434e6ba737b3fc327f9e94e4381a2 (patch)
treec539006a2344c8c1d49d44bfac7756f7c87b0d46 /mkspecs
parent83ea537b8e4e3ebd56c61b5fa1b5e306252476df (diff)
downloadQt-cef67062373434e6ba737b3fc327f9e94e4381a2.zip
Qt-cef67062373434e6ba737b3fc327f9e94e4381a2.tar.gz
Qt-cef67062373434e6ba737b3fc327f9e94e4381a2.tar.bz2
Make per-library settings for the gcce linker/compiler
The defaults are apparently not all that useful in gcce as elf2e32 doesn't like the stuff generated with them. So provide some defaults and make a simple structure to set the gcce-only defaults in one place. The qmake.conf for this mkspec
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/symbian/linux-gcce/features/qt.prf1
-rw-r--r--mkspecs/symbian/linux-gcce/features/symbian_building.prf25
-rw-r--r--mkspecs/symbian/linux-gcce/qmake.conf22
3 files changed, 33 insertions, 15 deletions
diff --git a/mkspecs/symbian/linux-gcce/features/qt.prf b/mkspecs/symbian/linux-gcce/features/qt.prf
index 79d46d1..fd2cd1b 100644
--- a/mkspecs/symbian/linux-gcce/features/qt.prf
+++ b/mkspecs/symbian/linux-gcce/features/qt.prf
@@ -9,7 +9,6 @@ INCLUDEPATH = $${EPOCROOT}epoc32/include/variant \
DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \
__SYMBIAN32__ \
- __MARM_THUMB__ \
__MARM_INTERWORK__ \
NDEBUG \
_UNICODE \
diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf
index 21c412c..fc9d621 100644
--- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf
+++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf
@@ -1,17 +1,16 @@
-gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -mthumb -msoft-float -T script
+gcceExtraFlags = -I${EPOCROOT}epoc32/include/ --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script
QMAKE_CFLAGS += $${gcceExtraFlags}
QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time
-# QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC
-# QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC
-# QMAKE_LFLAGS += --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x800000 --dll --no_scanlib
-# QMAKE_LFLAGS_APP += --entry _E32Startup
-# QMAKE_LFLAGS_SHLIB += --entry _E32Dll
-# QMAKE_CFLAGS_DEBUG += -g
-# QMAKE_CXXFLAGS_DEBUG += -g
-# QMAKE_CFLAGS_RELEASE += -O2 -Otime
-# QMAKE_CXXFLAGS_RELEASE += -O2 -Otime
-#
+# we have some module specific options (defined in qt.prf) lets add them
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS)
+!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS)
+!isEmpty(TMPVAR) {
+ QMAKE_LFLAGS += $$TMPVAR
+} else { # lets provide a simple default. Without elf2e32 complains
+ QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
+}
symbianObjdir=$$OBJECTS_DIR
isEmpty(symbianObjdir) {
@@ -22,7 +21,7 @@ isEmpty(symbianDestdir) {
symbianDestdir = .
}
-contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb") {
+contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") {
DEFINES += __MARM_THUMB__
}
@@ -108,14 +107,12 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
-lgcc
QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
- -Ttext 0x80000 -Tdata 0x400000 \
--target1-abs \
--no-undefined \
--strip-debug \
--nostdlib \
-L/home/zander/work/build-symbian/arm-2009q3/lib/gcc/arm-none-symbianelf/4.4.1/ \
-L/home/zander/work/build-symbian/arm-2009q3/arm-none-symbianelf/lib/
-
}
contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf
index 7e3dff7..cb30f61 100644
--- a/mkspecs/symbian/linux-gcce/qmake.conf
+++ b/mkspecs/symbian/linux-gcce/qmake.conf
@@ -14,6 +14,28 @@ 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
+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