From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23199 invoked by alias); 25 Sep 2009 10:24:11 -0000 Received: (qmail 22658 invoked by uid 22791); 25 Sep 2009 10:24:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65,J_CHICKENPOX_92,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Sep 2009 10:24:06 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8PANwXL026620; Fri, 25 Sep 2009 06:23:58 -0400 Received: from localhost.localdomain.redhat.com (vpn2-8-124.ams2.redhat.com [10.36.8.124]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8PANpJ4005480; Fri, 25 Sep 2009 06:23:52 -0400 To: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, binutils@sourceware.org Subject: RFA/RFC: Pass --cache-file=/dev/null on to subconfigures From: Nick Clifton Date: Fri, 25 Sep 2009 10:24:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00783.txt.bz2 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 * 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 ;;