From ba5e0d48b427da092b104d4fc8fec02ed078ec4d Mon Sep 17 00:00:00 2001 From: Wolfgang Bremer Date: Wed, 9 Apr 2014 10:17:20 +0200 Subject: Adding support for -separate-debug-info on win32 There is no valid reason why separate debug info support is missing from the win32 configure app. It can be used with proper cross compilation tool chains. Change-Id: I5cf5fba24abc3b515f893a3f5b799a0644fd3218 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d149511218..cff3f1bf0c 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -164,6 +164,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "GUI" ] = "yes"; dictionary[ "RTTI" ] = "yes"; dictionary[ "STRIP" ] = "yes"; + dictionary[ "SEPARATE_DEBUG_INFO" ] = "no"; dictionary[ "SSE2" ] = "auto"; dictionary[ "SSE3" ] = "auto"; dictionary[ "SSSE3" ] = "auto"; @@ -445,6 +446,10 @@ void Configure::parseCmdLine() dictionary[ "BUILDALL" ] = "yes"; else if (configCmdLine.at(i) == "-force-debug-info") dictionary[ "FORCEDEBUGINFO" ] = "yes"; + else if (configCmdLine.at(i) == "-no-separate-debug-info") + dictionary[ "SEPARATE_DEBUG_INFO" ] = "no"; + else if (configCmdLine.at(i) == "-separate-debug-info") + dictionary[ "SEPARATE_DEBUG_INFO" ] = "yes"; else if (configCmdLine.at(i) == "-compile-examples") { dictionary[ "COMPILE_EXAMPLES" ] = "yes"; @@ -1765,7 +1770,8 @@ bool Configure::displayHelp() desc("BUILD", "debug", "-debug", "Compile and link Qt with debugging turned on."); desc("BUILDALL", "yes", "-debug-and-release", "Compile and link two Qt libraries, with and without debugging turned on.\n"); - desc("FORCEDEBUGINFO", "yes","-force-debug-info", "Create symbol files for release builds.\n"); + desc("FORCEDEBUGINFO", "yes","-force-debug-info", "Create symbol files for release builds."); + desc("SEPARATE_DEBUG_INFO", "yes","-separate-debug-info", "Strip debug information into a separate file.\n"); desc("BUILDDEV", "yes", "-developer-build", "Compile and link Qt with Qt developer options (including auto-tests exporting)\n"); @@ -2165,6 +2171,9 @@ bool Configure::checkAvailability(const QString &part) if (part == "STYLE_WINDOWSXP") available = (platform() == WINDOWS) && findFile("uxtheme.h"); + else if (part == "OBJCOPY") + available = tryCompileProject("unix/objcopy"); + else if (part == "ZLIB") available = findFile("zlib.h"); @@ -2489,6 +2498,21 @@ bool Configure::verifyConfiguration() dictionary["C++11"] = "auto"; } + if (dictionary["SEPARATE_DEBUG_INFO"] == "yes") { + if (dictionary[ "SHARED" ] == "no") { + cout << "ERROR: -separate-debug-info is incompatible with -static" << endl << endl; + dictionary[ "DONE" ] = "error"; + } else if (dictionary[ "BUILD" ] != "debug" + && dictionary[ "BUILDALL" ] == "no" + && dictionary[ "FORCEDEBUGINFO" ] == "no") { + cout << "ERROR: -separate-debug-info needs -debug, -debug-and-release, or -force-debug-info" << endl << endl; + dictionary[ "DONE" ] = "error"; + } else if (dictionary["SEPARATE_DEBUG_INFO"] == "yes" && !checkAvailability("OBJCOPY")) { + cout << "ERROR: -separate-debug-info was requested but this binutils does not support it." << endl; + dictionary[ "DONE" ] = "error"; + } + } + if (dictionary["SQL_SQLITE_LIB"] == "no" && dictionary["SQL_SQLITE"] != "no") { cout << "WARNING: Configure could not detect the presence of a system SQLite3 lib." << endl << "Configure will therefore continue with the SQLite3 lib bundled with Qt." << endl; @@ -2752,6 +2776,8 @@ void Configure::generateOutputVars() if (dictionary[ "BUILDALL" ] == "yes") { qtConfig += "build_all"; } + if (dictionary[ "SEPARATE_DEBUG_INFO" ] == "yes") + qtConfig += "separate_debug_info"; if (dictionary[ "FORCEDEBUGINFO" ] == "yes") qmakeConfig += "force_debug_info"; qmakeConfig += dictionary[ "BUILD" ]; -- cgit v1.2.3 From dcfd36c2686bcbd56b6a0295640e228f76d7bf1d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 16 Apr 2014 19:35:17 +0200 Subject: Revert "Automatically link printsupport plugins to static applications." It has been fully obsoleted by 4255ba40ab073afcf2a095b135883612859af4c2. This reverts commit 99eecab83d4a4c79979aa0b1fcf1f58c14dcf526. Change-Id: Id7b8d3bba27ff43e38e4fe32a4f2950de9ced493 Reviewed-by: Friedemann Kleint Reviewed-by: John Layt --- tools/configure/configureapp.cpp | 14 +++----------- tools/configure/configureapp.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d149511218..fe2caa2efa 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3372,10 +3372,8 @@ void Configure::generateQConfigPri() if (!dictionary["QT_NAMESPACE"].isEmpty()) configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl; - if (dictionary[ "SHARED" ] == "no") { - configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl - << "QT_DEFAULT_PRINTSUPPORTPLUGIN = " << qpaPrintSupportPluginName() << endl; - } + if (dictionary[ "SHARED" ] == "no") + configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl; if (!configStream.flush()) dictionary[ "DONE" ] = "error"; @@ -3548,8 +3546,7 @@ void Configure::generateConfigfiles() for (int i = 0; i < qconfigList.count(); ++i) tmpStream << addDefine(qconfigList.at(i)); - tmpStream << "#define QT_QPA_DEFAULT_PLATFORM_NAME \"" << qpaPlatformName() << "\"" << endl - << "#define QT_QPA_DEFAULT_PRINTSUPPORTPLUGIN_NAME \"" << qpaPrintSupportPluginName() << "\"" << endl; + tmpStream<<"#define QT_QPA_DEFAULT_PLATFORM_NAME \"" << qpaPlatformName() << "\""<