From 2fd0b40ba3678c19c057fcaae0ae5457cc5b0396 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 22 Sep 2009 18:00:40 +0000 Subject: [PATCH] Error out if building separately but srcdir has build remnants. /: PR bootstrap/32272 * configure.ac: Error out if $srcdir isn't '.' but contains host-${host_noncanonical}. * configure: Regenerate. --- ChangeLog | 7 +++++++ configure | 5 +++++ configure.ac | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index e3d0ce7f4d..817ac56ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-09-22 Ralf Wildenhues + + PR bootstrap/32272 + * configure.ac: Error out if $srcdir isn't '.' but contains + host-${host_noncanonical}. + * configure: Regenerate. + 2009-09-21 Ralf Wildenhues * configure.ac: If bootstrapping a combined tree with diff --git a/configure b/configure index 720fa239c0..667b514b72 100755 --- a/configure +++ b/configure @@ -2743,6 +2743,11 @@ fi # No prefix. target_subdir=${target_noncanonical} +# Be sure to cover against remnants of an in-tree build. +if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then + as_fn_error "building out of tree but $srcdir contains host-${host_noncanonical}. +Use a pristine source tree when building in a separate tree" "$LINENO" 5 +fi # Skipdirs are removed silently. skipdirs= diff --git a/configure.ac b/configure.ac index 794a4191d5..e7d44db83d 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,11 @@ fi # Find the build and target subdir names. GCC_TOPLEV_SUBDIRS +# Be sure to cover against remnants of an in-tree build. +if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then + AC_MSG_ERROR([building out of tree but $srcdir contains host-${host_noncanonical}. +Use a pristine source tree when building in a separate tree]) +fi # Skipdirs are removed silently. skipdirs= -- 2.34.1