summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog6
-rw-r--r--config/acx.m49
2 files changed, 13 insertions, 2 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index c6885d131da..809396ba4e9 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-28 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/17383
+ * acx.m4 (GCC_TOPLEV_SUBDIRS): Set HOST_SUBDIR if an in-src
+ gcc build is going.
+
2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
* warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do
diff --git a/config/acx.m4 b/config/acx.m4
index d4a583dc67f..6d3e6d5d5ab 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -76,8 +76,13 @@ AC_DEFUN([GCC_TOPLEV_SUBDIRS],
AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl
# Prefix 'build-' so this never conflicts with target_subdir.
build_subdir="build-${build_noncanonical}"
-# Not really a subdirectory, but here for completeness.
-host_subdir=.
+# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
+if ( test $srcdir = . && test -d gcc ) \
+ || test -d $srcdir/../host-${host_noncanonical}; then
+ host_subdir="host-${host_noncanonical}"
+else
+ host_subdir=.
+fi
# No prefix.
target_subdir=${target_noncanonical}
AC_SUBST([build_subdir]) []dnl