diff options
author | Thomas Senyk <thomas.senyk@pelagicore.com> | 2012-07-12 13:03:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-01 02:25:37 +0200 |
commit | 18654058265dd1198c64d4c742ed4b651a2a7b90 (patch) | |
tree | b1a509b67ece9bb73d15acc41da907066879c616 /tools | |
parent | 019b97fc4fc84a9e81c66a659f5d22df2e0b85d6 (diff) |
Adding configure option: -no-gcc-sysroot
This option is important if you want to use configure's
and qmake's -sysroot (e.g. PKG_CONFIG settings, device-files),
but the toolchain (in combination with the rootfs)
is not able to handle gcc's --sysroot.
One known case is freescale's ltib setup where the toolchain
itself comes with all the essential files (e.g. crt1.o),
while the rootfs has none of those files, so gcc's
--sysroot can't be used. The rootfs on the other hand contains
all kinds of "less important" files/packages (e.g. libdbus).
For those "less important" files/packages Qt needs pkg-config
to be able to include/link properly. Therefore one needs
configures -sysroot without gcc's --sysroot.
Change-Id: Iaec9b07012f2945f3ecb3ced0ed95176721b5ecd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index b2e484d2a8..382c836896 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -239,6 +239,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QT_GLIB" ] = "no"; dictionary[ "QT_ICONV" ] = "auto"; dictionary[ "QT_CUPS" ] = "auto"; + dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; //Only used when cross compiling. dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg"; @@ -1090,6 +1091,9 @@ void Configure::parseCmdLine() break; dictionary[ "CFG_SYSROOT" ] = configCmdLine.at(i); } + else if (configCmdLine.at(i) == "-no-gcc-sysroot") { + dictionary[ "CFG_GCC_SYSROOT" ] = "no"; + } else if (configCmdLine.at(i) == "-hostprefix") { ++i; @@ -1692,7 +1696,8 @@ bool Configure::displayHelp() desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n"); desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' '); - desc( "-sysroot <dir>", "Sets <dir> as the target compiler's and qmake's sysroot."); + desc( "-sysroot <dir>", "Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths."); + desc( "-no-gcc-sysroot", "When using -sysroot, it disables the passing of --sysroot to the compiler "); desc("NIS", "no", "-no-nis", "Do not build NIS support."); desc("NIS", "yes", "-nis", "Build NIS support."); @@ -2957,7 +2962,7 @@ void Configure::generateQConfigPri() << "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; - if (!dictionary["CFG_SYSROOT"].isEmpty()) { + if (!dictionary["CFG_SYSROOT"].isEmpty() && dictionary["CFG_GCC_SYSROOT"] == "yes") { configStream << endl << "# sysroot" << endl << "!host_build {" << endl |