Index: build ================================================================== --- build +++ build @@ -156,12 +156,12 @@ pkgfound='1' for pkgchange in "${pkgchanges[@]}"; do case "${pkgchange}" in CFLAGS) - CFLAGS="${CFLAGS} -I${pkgdir}/include" - CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include" + CFLAGS="${CFLAGS} -isystem ${pkgdir}/include" + CPPFLAGS="${CPPFLAGS} -isystem ${pkgdir}/include" export CFLAGS CPPFLAGS ;; LDFLAGS) LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib" export LDFLAGS @@ -234,16 +234,16 @@ if [ ! -f "${dynlinker}" ]; then die 'glibc directory is not available (appfs running/working?)' fi - gcc_default_headers="$(echo '' | ${CPP:-cpp} -v 2>&1 | sed '/^End of search list/,$ d;0,/search starts here:$/ d' | grep '/gcc/' | sed 's@^ *@-I@' | tr $'\n' ' ')" + gcc_default_headers="$(echo '' | ${CPP:-cpp} -v 2>&1 | sed '/^End of search list/,$ d;0,/search starts here:$/ d' | grep '/gcc/' | sed 's@^ *@-isystem @' | tr $'\n' ' ')" - CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -I${glibcdir}/include" + CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -isystem ${glibcdir}/include" if ! echo " ${require[*]} " | grep ' linux-headers[/@: ]' >/dev/null; then - CC="${CC} -I${linuxheadersdir}/include" + CC="${CC} -isystem ${linuxheadersdir}/include" fi BUILD_CC="${CC}" HOST_CC="${CC}" LDFLAGS="${LDFLAGS} -L${glibcdir}/lib -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"