Pass variables to qmake on the commandline



  • Hi,

    I do crosscompiling linux/x86_64->linux/armv7 with openbricks.
    Please not that I am building qt itself, not a project that is using qt.
    This works, but produces one specific compiler warning over and over again.
    @/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/bin/armv7-openbricks-linux-gnueabi-g++ -c -O2 -march=armv7-a -ffast-math -fPIC -mfloat-abi=softfp -mfpu=neon -Wall -pipe -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/include -fno-strict-volatile-bitfields -pthread -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include/glib-2.0 -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/lib/glib-2.0/include -O2 -mfpu=neon -mfloat-abi=softfp -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include/freetype2 -fPIC -DQT_SHARED -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_WEBKIT -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_HAVE_NEON -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-openbricks -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -Iimage -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include/X11 -I.uic/release-shared -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include -I/home/schwammerl/devel/openbricks/build/build.foo.eglibc/toolchain/armv7-openbricks-linux-gnueabi/sysroot/usr/local/include/freetype2 -o .obj/release-shared/qwindowsurface_x11.o painting/qwindowsurface_x11.cpp
    In file included from ../../include/QtCore/qstring.h:1:0,
    from ../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
    from ../../include/QtCore/qobject.h:1,
    from ../../include/QtCore/../../src/corelib/io/qiodevice.h:46,
    from ../../include/QtCore/qiodevice.h:1,
    from ../../include/QtCore/../../src/corelib/io/qdatastream.h:46,
    from ../../include/QtCore/qdatastream.h:1,
    from ../../include/QtCore/../../src/corelib/tools/qstringlist.h:46,
    from ../../include/QtCore/qstringlist.h:1,
    from ../../include/QtGui/../../src/gui/painting/qcolor.h:47,
    from ../../include/QtGui/qcolor.h:1,
    from ../../include/QtGui/../../src/gui/image/qpixmap.h:46,
    from ../../include/QtGui/qpixmap.h:1,
    from ../../include/QtGui/../../src/gui/painting/qpainter.h:49,
    from ../../include/QtGui/qpainter.h:1,
    from ../../include/QtGui/QPainter:1,
    from painting/qwindowsurface_x11.cpp:43:
    ../../include/QtCore/../../src/corelib/tools/qstring.h:174:14: note: the mangling of 'va_list' has changed in GCC 4.4
    @

    This phenomenon is known and not really a problem.
    Although it occupies a lot of terminal real estate and therefore I want to get rid of it.
    This can be done by passing "-Wno-psabi" to g++.
    I tried to do that my passing "-after QMAKE_CXXFLAGS+=-Wno-psabi" to qmake in the build script for qt that openbricks provides, see [1].

    Unfortunately this does not have the desired effect, it has no effect at all for the affected compiler calls.
    How do I do that correctly?
    Any hints appreciated.
    Thanks advance.

    Kind regards,
    -schwammerl

    [1] http://hg.openbricks.org/openbricks/raw-file/0dcebd051e84/packages/qt/build



  • I don't know if you copied code correctly, but in your pro file you should not write:
    @
    -after QMAKE_CXXFLAGS+=-Wno-psabi
    @
    Correct is:
    @
    QMAKE_CXXFLAGS+=-Wno-psabi
    @



  • I do not have a .pro file.
    Did you notice that I am building qt itself and not a project that is using qt?



  • I did not find a real solution.
    Therefore I added the following to configure.
    @QMakeVar add QMAKE_CXXFLAGS -Wno-psabi@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.