===================================================================
@@ -4167,6 +4167,8 @@
-d "/opt/$with_advance_toolchain/bin/." -a \
-d "/opt/$with_advance_toolchain/include/."; then
+ orig_native_system_header_dir=$native_system_header_dir
+ native_system_header_dir=`find /opt/$with_advance_toolchain/ -path '*/include/features.h' | sed -e 's#/features.h##'`
tm_file="$tm_file ./advance-toolchain.h"
(at="/opt/$with_advance_toolchain"
echo "/* Use Advance Toolchain $at */"
@@ -4178,7 +4180,7 @@
echo "#if USE_AT_INCLUDE_FILES"
echo "#undef INCLUDE_EXTRA_SPEC"
echo "#define INCLUDE_EXTRA_SPEC" \
- "\"-isystem $at/include\""
+ "\"%{!nostdinc:-idirafter $orig_native_system_header_dir}\""
echo "#endif"
echo
echo "#undef LINK_OS_EXTRA_SPEC32"