Diff

Differences From Artifact [5526d031f2]:

To Artifact [6b42e787ea]:


   154    154   			fi
   155    155   
   156    156   			pkgfound='1'
   157    157   
   158    158   			for pkgchange in "${pkgchanges[@]}"; do
   159    159   				case "${pkgchange}" in
   160    160   					CFLAGS)
   161         -						CFLAGS="${CFLAGS} -I${pkgdir}/include"
   162         -						CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
          161  +						CFLAGS="${CFLAGS} -isystem ${pkgdir}/include"
          162  +						CPPFLAGS="${CPPFLAGS} -isystem ${pkgdir}/include"
   163    163   						export CFLAGS CPPFLAGS
   164    164   						;;
   165    165   					LDFLAGS)
   166    166   						LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
   167    167   						export LDFLAGS
   168    168   						;;
   169    169   					PATH)
................................................................................
   232    232   
   233    233   	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"
   234    234   
   235    235   	if [ ! -f "${dynlinker}" ]; then
   236    236   		die 'glibc directory is not available (appfs running/working?)'
   237    237   	fi
   238    238   
   239         -	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' ' ')"
          239  +	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' ' ')"
   240    240   
   241         -	CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -I${glibcdir}/include"
          241  +	CC="${CC:-gcc} -nostdinc ${gcc_default_headers} -isystem ${glibcdir}/include"
   242    242   
   243    243   	if ! echo " ${require[*]} " | grep ' linux-headers[/@: ]' >/dev/null; then
   244         -		CC="${CC} -I${linuxheadersdir}/include"
          244  +		CC="${CC} -isystem ${linuxheadersdir}/include"
   245    245   	fi
   246    246   
   247    247   	BUILD_CC="${CC}"
   248    248   	HOST_CC="${CC}"
   249    249   	LDFLAGS="${LDFLAGS} -L${glibcdir}/lib -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
   250    250   	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
   251    251   	export CC BUILD_CC HOST_CC LDFLAGS PKG_CONFIG_LIBDIR