This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA/RFC: Pass --cache-file=/dev/null on to subconfigures
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Fri, 25 Sep 2009 11:23:48 +0100
- Subject: RFA/RFC: Pass --cache-file=/dev/null on to subconfigures
Hi Guys,
I am regularly encountering problems rebuilding my toolchains
because the config.cache file in one or more of the sub-directories
is inconsistent:
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
This is annoying because it stops the automated build process and I
have to manually remove the cache file before I can resume it.
Since I am not worried about the time it takes to rerun the
configure script in these sub-directories I would like to be able to
build the entire toolchain without using any caches.
In theory I can specify "--cache-file=/dev/null" when configuring
the toolchain. Unfortunately the top level configure file strips
out all --cache-file arguments before invoking configure in any of
the sub-directories. Although this might be reasonable for a
configure cache that is specified via an absolute path, it is
unreasonable when the user is trying to disable caches altogether.
So I have created the patch below. It simply allows
--cache-file=/dev/null to be passed on to the configure scripts in
the sub-directories. I have run a gcc bootstrap without problems
and so I would like to apply the patch.
Any comments or reasons why the patch should not be applied ?
Cheers
Nick
./ChangeLog
2009-09-25 Nick Clifton <nickc@redhat.com>
* configure.ac: Pass any --cache-file=/dev/null option on to
subconfigures.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 152111)
+++ configure.ac (working copy)
@@ -2632,9 +2632,11 @@
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target, nonopt, and variable assignments. These are the ones we
-# might not want to pass down to subconfigures. Also strip
-# program-prefix, program-suffix, and program-transform-name, so that
-# we can pass down a consistent program-transform-name.
+# might not want to pass down to subconfigures. The exception being
+# --cache-file=/dev/null, which is used to turn off the use of cache
+# files altogether, and which should be passed on to subconfigures.
+# Also strip program-prefix, program-suffix, and program-transform-name,
+# so that we can pass down a consistent program-transform-name.
baseargs=
keep_next=no
skip_next=no
@@ -2673,6 +2675,13 @@
esac
case "$ac_arg" in
+ --cache-file=/dev/null | \
+ -cache-file=/dev/null )
+ # Handled here to avoid the test to skip args below.
+ baseargs="$baseargs '$ac_arg'"
+ # Assert: $separate_arg should always be no.
+ keep_next=$separate_arg
+ ;;
--no*)
continue
;;