From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15221 invoked by alias); 15 Feb 2010 10:53:13 -0000 Received: (qmail 15068 invoked by uid 22791); 15 Feb 2010 10:53:12 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,HK_OBFDOMREQ,RCVD_IN_DNSWL_HI,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; Mon, 15 Feb 2010 10:53:10 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1FAr2b1001401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Feb 2010 05:53:02 -0500 Received: from Gift.redhat.com (vpn1-7-5.ams2.redhat.com [10.36.7.5]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1FAqwqG010141; Mon, 15 Feb 2010 05:52:59 -0500 From: Nick Clifton To: binutils@sourceware.org Cc: gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org Subject: Remove config.cache files when reconfiguring at top level Date: Mon, 15 Feb 2010 10:53: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: 2010-02/txt/msg00359.txt.bz2 Hi Guys, I am going to apply the patch below to the top level configure.ac file to fix a problem reported in the binutils PR 11238. Essentially the problem is that if a toolchain builder re-runs the configure script with a new set of CFLAGS (or some other similar variable) without first running distclean, then the config.cache files will be left behind in the build sub-directories. This then prevents the the next build from working as the cached value of CFLAGS differs from the new one. The patch fixes the problem by makeing the configure script delete config.cache files at the same time as it is deleting Makefiles in the sub-directories. Cheers Nick ChangeLog 2010-02-15 Nick Clifton PR 11238 * configure.ac: Delete config.cache files in sub-directories when deleting Makefiles. * configure: Regenerate. Index: configure.ac =================================================================== RCS file: /cvs/src/src/configure.ac,v retrieving revision 1.93 diff -c -3 -p -r1.93 configure.ac *** configure.ac 15 Feb 2010 10:37:54 -0000 1.93 --- configure.ac 15 Feb 2010 10:42:04 -0000 *************** for module in ${build_configdirs} ; do *** 2710,2715 **** --- 2710,2721 ---- echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" rm -f ${build_subdir}/${module}/Makefile fi + # PR 11238: Also remove config.cache files. + if test -z "${no_recursion}" \ + && test -f ${build_subdir}/${module}/config.cache; then + echo 1>&2 "*** removing ${build_subdir}/${module}/config.cache to allow reconfigure" + rm -f ${build_subdir}/${module}/config.cache + fi extrasub_build="$extrasub_build /^@if build-$module\$/d /^@endif build-$module\$/d *************** for module in ${configdirs} ; do *** 2725,2730 **** --- 2731,2741 ---- rm -f ${file} fi done + # PR 11238: Also remove config.cache files. + if test -f ${module}/config.cache; then + echo 1>&2 "*** removing ${module}/config.cache to allow reconfigure" + rm -f ${module}/config.cache + fi fi extrasub_host="$extrasub_host /^@if $module\$/d *************** for module in ${target_configdirs} ; do *** 2739,2744 **** --- 2750,2761 ---- echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure" rm -f ${target_subdir}/${module}/Makefile fi + # PR 11238: Also remove config.cache files. + if test -z "${no_recursion}" \ + && test -f ${target_subdir}/${module}/config.cache; then + echo 1>&2 "*** removing ${target_subdir}/${module}/config.cache to allow reconfigure" + rm -f ${target_subdir}/${module}/config.cache + fi # We only bootstrap target libraries listed in bootstrap_target_libs. case $bootstrap_target_libs in