--- configure.orig 2009-04-07 18:00:41.000000000 +0400 +++ configure 2009-04-07 18:06:28.000000000 +0400 @@ -5758,7 +5758,7 @@ # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor # desired. -build_configargs="--cache-file=../config.cache ${baseargs}" +build_configargs="${baseargs}" # For host modules, accept cache file option, or specification as blank. case "${cache_file}" in @@ -5808,7 +5808,7 @@ # Pass the appropriate --build, --host, --target and --cache-file arguments. # We need to pass --target, as newer autoconf's requires consistency # for target_alias and gcc doesn't manage it consistently. -target_configargs="--cache-file=./config.cache ${target_configargs}" +target_configargs="${target_configargs}" FLAGS_FOR_TARGET= case " $target_configdirs " in @@ -5893,7 +5893,7 @@ # being built; programs in there won't even run. if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then # Search for pre-installed headers if nothing else fits. - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $$r/$(HOST_SUBDIR)/gcc -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' fi if test "x${use_gnu_ld}" = x &&