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 /configure | |
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 'configure')
-rwxr-xr-x | configure | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -835,6 +835,7 @@ QT_INSTALL_SETTINGS= QT_INSTALL_EXAMPLES= QT_INSTALL_TESTS= CFG_SYSROOT= +CFG_GCC_SYSROOT="yes" QT_HOST_PREFIX= QT_HOST_BINS= QT_HOST_DATA= @@ -1173,6 +1174,9 @@ while [ "$#" -gt 0 ]; do sysroot) CFG_SYSROOT="$VAL" ;; + gcc-sysroot) + CFG_GCC_SYSROOT="$VAL" + ;; bindir) QT_INSTALL_BINS="$VAL" ;; @@ -2536,7 +2540,7 @@ if [ -n "$GCC_MACHINE_DUMP" ]; then DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine) fi -if [ -n "$CFG_SYSROOT" ]; then +if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then SYSROOT_FLAG="--sysroot=$CFG_SYSROOT" else SYSROOT_FLAG= @@ -3183,7 +3187,8 @@ Additional options: -xplatform target ... The target platform when cross-compiling. - -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot. + -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths. + -no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler -no-feature-<feature> Do not compile in <feature>. -feature-<feature> .. Compile in <feature>. The available features @@ -5910,7 +5915,7 @@ if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then echo >> "$QTCONFIG.tmp" fi -if [ -n "$CFG_SYSROOT" ]; then +if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes"]; then echo "# sysroot" >>"$QTCONFIG.tmp" echo "!host_build {" >>"$QTCONFIG.tmp" echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp" |