From 25fe85b199ab52bfa0a2e4c1da41fee1f4a26fbe Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 14 Feb 2018 17:08:43 -0800
Subject: [PATCH] mkspecs/common/gcc-base.conf: Use -I instead of -isystem

-isystem fails to build when code uses include_next on certain files e.g.

qtbase/5.10.0+gitAUTOINC+50117d738a-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:11592: .obj/qgenericpluginfactory.o] Error 1

Upstream-Status: Pending

Change-Id: Ia47832a6339a6ee59c0a6301fc5e552cd28b1029
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 mkspecs/common/clang.conf    | 2 +-
 mkspecs/common/gcc-base.conf | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index 5800aaa5b4..7b4901ce46 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -16,7 +16,7 @@ QMAKE_LINK_SHLIB        = $$QMAKE_CXX
 CONFIG                 += clang_pch_style
 QMAKE_PCH_OUTPUT_EXT    = .pch
 
-QMAKE_CFLAGS_ISYSTEM             = -isystem
+QMAKE_CFLAGS_ISYSTEM             =
 QMAKE_CFLAGS_PRECOMPILE          = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
 QMAKE_CFLAGS_USE_PRECOMPILE      = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
 QMAKE_CFLAGS_LTCG                = -flto
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index c2669e4833..3fde8dc85f 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -46,7 +46,7 @@ QMAKE_CFLAGS_DEBUG         += -g
 QMAKE_CFLAGS_SHLIB         += $$QMAKE_CFLAGS_PIC
 QMAKE_CFLAGS_STATIC_LIB    += $$QMAKE_CFLAGS_PIC
 QMAKE_CFLAGS_APP           += $$QMAKE_CFLAGS_PIC
-QMAKE_CFLAGS_ISYSTEM        = -isystem
+QMAKE_CFLAGS_ISYSTEM        =
 QMAKE_CFLAGS_YACC          += -Wno-unused -Wno-parentheses
 QMAKE_CFLAGS_HIDESYMS      += -fvisibility=hidden
 QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
