https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78697
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> --- well, it does make sense when the header files differ, however that is not the case for the gc header files afaics. Is this what you are looking for? The fallback directory should not override the values given in --with-target-bdw-gc= from my point of view. --- configure.ac (revision 243108) +++ configure.ac (working copy) @@ -256,16 +256,19 @@ for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do case "$i" in *=*) sd=${i%%=*}; d=${i#*=} ;; - *) sd=.; d=$i ;; + *) sd=.; d=$i; fallback=$i ;; esac if test "$mldir" = "$sd"; then bdw_val=$d fi done - if test "x$bdw_val" = x; then + if test "x$bdw_val" = x && test "x$bdw_inc_dir" = x && test "x$fallback" != x; then + bdw_inc_dir="$fallback" + else if test "x$bdw_val" = x; then AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include]) + else + bdw_inc_dir="$bdw_val" fi - bdw_inc_dir="$bdw_val" fi bdw_val= if test "x$with_target_bdw_gc_lib" != x; then