From 3cc5feeadf81b8e6d7dc6efddd751e9471888078 Mon Sep 17 00:00:00 2001
From: Thomas Zander <t.zander@nokia.com>
Date: Tue, 9 Feb 2010 14:38:29 +0100
Subject: Move duplicated code out to a qmake feature

---
 mkspecs/symbian/features/do_not_build_as_thumb.prf | 8 ++++++++
 src/3rdparty/webkit/WebCore/WebCore.pro            | 9 +--------
 src/s60main/s60main.pro                            | 2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)
 create mode 100644 mkspecs/symbian/features/do_not_build_as_thumb.prf

diff --git a/mkspecs/symbian/features/do_not_build_as_thumb.prf b/mkspecs/symbian/features/do_not_build_as_thumb.prf
new file mode 100644
index 0000000..60d9382
--- /dev/null
+++ b/mkspecs/symbian/features/do_not_build_as_thumb.prf
@@ -0,0 +1,8 @@
+symbian-abld|symbian-sbsv2 {
+    MMP_RULES += ALWAYS_BUILD_AS_ARM
+} else:linux-armcc {
+    QMAKE_CFLAGS -= --thumb
+    QMAKE_CFLAGS += --arm
+    QMAKE_CXXFLAGS -= --thumb
+    QMAKE_CXXFLAGS += --arm
+}
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index de185c1..7f2a17d 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -24,14 +24,7 @@ symbian: {
     # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
     # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
     QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
-    symbian-abld|symbian-sbsv2 {
-        MMP_RULES += ALWAYS_BUILD_AS_ARM
-    } else:linux-armcc {
-        QMAKE_CFLAGS -= --thumb
-        QMAKE_CFLAGS += --arm
-        QMAKE_CXXFLAGS -= --thumb
-        QMAKE_CXXFLAGS += --arm
-    }
+    CONFIG += do_not_build_as_thumb
 }
 
 include($$PWD/../WebKit.pri)
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index 47cf020..05a045b 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -17,7 +17,7 @@ symbian {
                     qts60main_mcrt0.cpp
 
     # s60main needs to be built in ARM mode for GCCE to work.
-    MMP_RULES+="ALWAYS_BUILD_AS_ARM"
+    CONFIG += do_not_build_as_thumb
 
     # staticlib should not have any lib depencies in s60
     # This seems not to work, some hard coded libs are still added as dependency
-- 
cgit v0.12