summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-08-31 11:57:08 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-08-31 12:48:27 (GMT)
commit0781e6e539b07872f5d2063594a2057f3e31c9ec (patch)
treed8fbec55e510146f0749426fe98f714701a18250
parentcf28f6cacf59d434072656af05466541ba69e8ae (diff)
downloadQt-0781e6e539b07872f5d2063594a2057f3e31c9ec.zip
Qt-0781e6e539b07872f5d2063594a2057f3e31c9ec.tar.gz
Qt-0781e6e539b07872f5d2063594a2057f3e31c9ec.tar.bz2
Fix gcce building of apps using static libraries in symbian-sbsv2
Removed usage of buggy .release_gcce target from symbian-sbsv2 generated makefiles. Now gcce builds like armv5 as it is supposed to when using Raptor. Task-number: QTBUG-13307 Reviewed-by: axis
-rwxr-xr-xbin/createpackage.pl17
-rwxr-xr-xbin/patch_capabilities.pl9
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc1
-rw-r--r--mkspecs/features/sis_targets.prf10
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm2
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qt.xml1
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp23
7 files changed, 50 insertions, 13 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 984c1fd..2569a66 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -81,11 +81,14 @@ Where supported options are as follows:
[-o|only-unsigned] = Creates only unsigned package.
[-s|stub] = Generates stub sis for ROM.
[-n|sisname <name>] = Specifies the final sis name.
+ [-g|gcce-is-armv5] = Convert gcce platform to armv5.
Where parameters are as follows:
templatepkg = Name of .pkg file template
target = Either debug or release
platform = One of the supported platform
winscw | gcce | armv5 | armv6 | armv7
+ Note that when packaging binaries built using gcce and symbian-sbsv2
+ mkspec, armv5 must be used for platform instead of gcce.
certificate = The certificate file used for signing
key = The certificate's private key file
passphrase = The passphrase of the certificate's private key file
@@ -123,6 +126,7 @@ my $preserveUnsigned = "";
my $stub = "";
my $signed_sis_name = "";
my $onlyUnsigned = "";
+my $convertGcce = "";
unless (GetOptions('i|install' => \$install,
'p|preprocess' => \$preprocessonly,
@@ -130,7 +134,8 @@ unless (GetOptions('i|install' => \$install,
'u|unsigned' => \$preserveUnsigned,
'o|only-unsigned' => \$onlyUnsigned,
's|stub' => \$stub,
- 'n|sisname=s' => \$signed_sis_name,)) {
+ 'n|sisname=s' => \$signed_sis_name,
+ 'g|gcce-is-armv5' => \$convertGcce,)) {
Usage();
}
@@ -146,6 +151,16 @@ $target = $tmpvalues[0] or $target = "";
my $platform;
$platform = $tmpvalues[1] or $platform = "";
+if ($platform =~ m/^gcce$/i) {
+ if (($convertGcce ne "")) {
+ $platform = "armv5";
+ } elsif ($ENV{SBS_HOME}) {
+ # Print a informative note in case suspected misuse is detected.
+ print "\nNote: You should use armv5 as platform or specify -g parameter to convert platform\n";
+ print " when packaging gcce binaries built using symbian-sbsv2 mkspec.\n\n";
+ }
+}
+
# Convert visual target to real target (debug->udeb and release->urel)
$target =~ s/debug/udeb/i;
$target =~ s/release/urel/i;
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 7d6f5dc..0c0538c 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -54,7 +54,9 @@ sub Usage() {
print("If no capabilities are given, the binaries will be given the\n");
print("capabilities supported by self-signed certificates.\n\n");
print(" *** NOTE: If *_template.pkg file is given and one is using symbian-abld or\n");
- print(" symbian-sbsv2 platform, 'target-platform' is REQUIRED. ***\n");
+ print(" symbian-sbsv2 platform, 'target-platform' is REQUIRED. ***\n\n");
+ print(" *** NOTE2: When patching gcce binaries built with symbian-sbsv2 toolchain,\n");
+ print(" armv5 must be specified as platform.\n");
print("\nUsage: patch_capabilities.pl pkg_filename [target-platform [capability list]]\n");
print("\nE.g. patch_capabilities.pl myapp_template.pkg release-armv5 \"All -TCB\"\n");
exit();
@@ -104,6 +106,11 @@ if (@ARGV)
# Convert visual target to real target (debug->udeb and release->urel)
$target =~ s/debug/udeb/i;
$target =~ s/release/urel/i;
+
+ if (($platform =~ m/^gcce$/i) && ($ENV{SBS_HOME})) {
+ # Print a informative note in case suspected misuse is detected.
+ print "\nNote: You must use armv5 as platform when packaging gcce binaries built using symbian-sbsv2 mkspec.\n";
+ }
}
# If the specified ".pkg" file exists (and can be read),
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 701707e..fafe007 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -219,6 +219,7 @@
\row \o -o \o Creates only unsigned package.
\row \o -s \o Generates stub sis for ROM.
\row \o -n <name> \o Specifies the final sis name.
+ \row \o -g \o Treat gcce platform as armv5.
\endtable
Execute the \c{createpackage.pl} script without any
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf
index abdf2d4..e069ee1 100644
--- a/mkspecs/features/sis_targets.prf
+++ b/mkspecs/features/sis_targets.prf
@@ -11,6 +11,12 @@ else:!equals(DEPLOYMENT, default_deployment) {
equals(GENERATE_SIS_TARGETS, true) {
symbian-abld|symbian-sbsv2 {
+ symbian-sbsv2 {
+ CONVERT_GCCE_PARAM = -g
+ } else {
+ CONVERT_GCCE_PARAM =
+ }
+
make_cache_name = .make.cache
sis_target.target = sis
sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
@@ -28,7 +34,7 @@ equals(GENERATE_SIS_TARGETS, true) {
)
ok_sis_target.target = ok_sis
- ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ ok_sis_target.commands = createpackage.bat $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
$(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
unsigned_sis_target.target = unsigned_sis
@@ -47,7 +53,7 @@ equals(GENERATE_SIS_TARGETS, true) {
)
ok_unsigned_sis_target.target = ok_unsigned_sis
- ok_unsigned_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg $(QT_SIS_TARGET)
+ ok_unsigned_sis_target.commands = createpackage.bat $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg $(QT_SIS_TARGET)
target_sis_target.target = $$basename(TARGET).sis
target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
index 47c3f1e..21638ea 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm
@@ -38,7 +38,7 @@ $(STORE_BUILD_TARGET):
echo "# make sis target." >> $(CACHE_FILENAME) && \
echo "# Version : " >> $(CACHE_FILENAME) && \
echo "# ==============================================================================" >> $(CACHE_FILENAME) && \
- echo QT_SIS_TARGET ?= $(VISUAL_CFG)-$(VARIANTPLATFORM) >> $(CACHE_FILENAME)
+ echo QT_SIS_TARGET ?= $(VISUAL_CFG)-$(PLATFORM_PATH) >> $(CACHE_FILENAME)
$(call endrule,qmake_store_build)
endef
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qt.xml b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
index 12857a2..0f7db3c 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qt.xml
+++ b/mkspecs/symbian-sbsv2/flm/qt/qt.xml
@@ -37,6 +37,5 @@
<interface name="qt.qmake_store_build" extends="Symbian.UserFLM"
flm="qmake_store_build.flm">
- <param name='VARIANTPLATFORM' />
</interface>
</build>
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 036eb1d..e794351 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -202,10 +202,18 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
QString genericClause = " -c %1_%2" + testClause;
QString winscwClause = " -c winscw_%1.mwccinc" + testClause;
QString gcceClause;
- if (QString::compare(gcceVersion(), UNDETECTED_GCCE_VERSION) == 0)
- allPlatforms.removeAll(PLATFORM_GCCE);
- else
- gcceClause = " -c arm.v5.%1." + gcceVersion() + ".release_gcce" + testClause;
+ bool stripArmv5 = false;
+
+ if (allPlatforms.contains(PLATFORM_GCCE)) {
+ if (QString::compare(gcceVersion(), UNDETECTED_GCCE_VERSION) == 0) {
+ allPlatforms.removeAll(PLATFORM_GCCE);
+ } else {
+ gcceClause = " -c arm.v5.%1." + gcceVersion() + testClause;
+ // Since gcce building is enabled, do not add armv5 for any sbs command
+ // that also contains gcce, because those will build same targets.
+ stripArmv5 = true;
+ }
+ }
QStringList allClauses;
QStringList debugClauses;
@@ -216,14 +224,15 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
releasePlatforms.removeAll(PLATFORM_WINSCW); // No release for emulator
foreach(QString item, debugPlatforms) {
- debugClauses << configClause(item, debugBuild, winscwClause, gcceClause, genericClause);
+ if (item != PLATFORM_ARMV5 || !stripArmv5)
+ debugClauses << configClause(item, debugBuild, winscwClause, gcceClause, genericClause);
}
foreach(QString item, releasePlatforms) {
- releaseClauses << configClause(item, releaseBuild, winscwClause, gcceClause, genericClause);
+ if (item != PLATFORM_ARMV5 || !stripArmv5)
+ releaseClauses << configClause(item, releaseBuild, winscwClause, gcceClause, genericClause);
}
allClauses << debugClauses << releaseClauses;
-
QTextStream t(&wrapperFile);
t << "# ==============================================================================" << endl;