Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
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	[thread overview]
Message-ID: <m3k4ue6a9i.fsf@redhat.com> (raw)

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  <nickc@redhat.com>

	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


             reply	other threads:[~2010-02-15 10:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15 10:53 Nick Clifton [this message]
2010-02-15 10:58 ` Andreas Schwab
2010-02-15 15:54   ` Nick Clifton
2010-02-15 18:04     ` Andreas Schwab
2010-02-15 18:23       ` Alfred M. Szmidt
2010-02-15 19:37         ` Andreas Schwab
2010-02-16 11:23           ` Alfred M. Szmidt
2010-02-16 10:07       ` Nick Clifton
     [not found]       ` <4B7A6E32.6070307__49868.1737961762$1266314832$gmane$org@redhat.com>
2010-02-16 10:42         ` Andreas Schwab
2010-02-16 11:04           ` Nick Clifton
2010-02-16 11:12             ` Andreas Schwab
2010-02-16 11:23             ` Alfred M. Szmidt
2010-02-16 12:40               ` Nick Clifton
2010-02-16 13:25                 ` Alfred M. Szmidt
2010-02-16 14:03                   ` Andreas Schwab
2010-02-17 10:06                   ` Nick Clifton
2010-02-17 10:17                     ` Mark Kettenis
2010-02-17 11:04                       ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k4ue6a9i.fsf@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox