Go to file
Alexey Brodkin 3a0ed5d25e qt5: Disable passing of -isystem flag in CXXFLAGS
Some Qt5 sub-projects as well as 3rd-party apps written on Qt
are failing to compile with gcc 6.x like that:
---------------------------->8-------------------------
In file included from XXX/output/host/usr/arc-buildroot-linux-uclibc/include/c++/6.2.1/bits/stl_algo.h:59:0,
                 from XXX/output/host/usr/arc-buildroot-linux-uclibc/include/c++/6.2.1/algorithm:62,
                 from XXX/output/host/usr/arc-buildroot-linux-uclibc/sysroot/usr/include/qt5/QtCore/qglobal.h:88,
                 from XXX/output/host/usr/arc-buildroot-linux-uclibc/sysroot/usr/include/qt5/QtCore/qpair.h:37,
                 from qmediametadata.h:37,
                 from qmediametadata.cpp:28:
XXX/output/host/usr/arc-buildroot-linux-uclibc/include/c++/6.2.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
---------------------------->8-------------------------

That happens because qmake trying to play smart passes some
include paths in Makefile with "-isystem" prefix.
Which in some cases lead to build failure well described in [1].

A little bit more details below on what really happens:

1. In "configure" script Qt determines default include paths of the
   toolchain and stores them in DEFAULT_INCDIRS variable, see [2].

2. On qmake execution when it creates Makefile out of .pro-file
   it parses headers in INCLUDEPATH variable and if a path matches
   one in DEFAULT_INCDIRS then in CXXFLAGS that path is written
   with $QMAKE_CFLAGS_ISYSTEM prefix, otherwise non-matching include
   path ends up in CXXFLAGS with normal "-I" prefix.

3. By default for gcc "QMAKE_CFLAGS_ISYSTEM = -isystem", see [3].

4. gcc fails to find stdlib.h, again refer to Jörg's explanation in [1].

What we do here we force set QMAKE_CFLAGS_ISYSTEM to "" and so qmake
won't use "-isystem" any longer instead expected "-I" will be used for
all headers, see [4].

That fixes building of Qt5Webkit on ARM with gcc 6.x and a number of
autobuilder failures for ARC (the an arch that uses gcc 6 by default) like:
http://autobuild.buildroot.net/results/56a/56a6700774af692e7f5a99b452b15e4e8592310f
http://autobuild.buildroot.net/results/697/697412b29bf031bf8f246cc3af97ebcbf6bf6d1b

[1] https://git.buildroot.net/buildroot/commit/?id=e79272fa7ff3d66c18de3514b912cd9d68d121a4
[2] http://code.qt.io/cgit/qt/qtbase.git/tree/configure?h=5.6.1#n3660
[3] http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/common/gcc-base.conf?h=5.6.1#n47
[4] http://code.qt.io/cgit/qt/qtbase.git/tree/qmake/generators/unix/unixmake2.cpp?&h=5.6.1#n193

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Seiderer <ps.report@gmx.net>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-05 10:01:12 +02:00
arch arch: remove support for sh64 2016-09-08 22:15:15 +02:00
board configs/imx6ulpico: Use common script for image generation 2016-10-03 23:14:30 +02:00
boot u-boot: Fix building for ARC700 2016-09-25 23:24:27 +02:00
configs configs/imx6ulpico: Bump to kernel 4.8 2016-10-03 23:36:36 +02:00
docs docs/manual: no warranty on output of legal-info 2016-10-03 23:19:07 +02:00
fs fs/common: add option to execute custom scripts under fakeroot 2016-07-03 20:58:46 +02:00
linux linux: bump default to version 4.8 2016-10-03 17:14:46 +02:00
package qt5: Disable passing of -isystem flag in CXXFLAGS 2016-10-05 10:01:12 +02:00
support support/scripts/get-developers: add new script 2016-09-21 09:02:13 +02:00
system add mksh to system shell choice 2016-10-01 23:22:18 +02:00
toolchain toolchain-external: bump version of Linaro AArch64 toolchain 2016-09-25 22:00:56 +02:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.gitignore
CHANGES CHANGES: fix typo in 2016.08 release line 2016-09-21 23:06:11 +02:00
Config.in google-breakpad: needs thread support 2016-09-19 16:50:46 +02:00
Config.in.legacy weston: bump to version 1.12.0 2016-09-25 23:17:06 +02:00
COPYING
DEVELOPERS DEVELOPERS: update my entry list 2016-10-03 23:18:26 +02:00
Makefile linux: use INSTALL_MOD_STRIP=1 to strip modules 2016-09-19 19:29:02 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches