From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com,
binutils@sources.redhat.com, dj@redhat.com
Subject: (toplevel patch) Make subconfigures run serially
Date: Tue, 03 Dec 2002 14:07:00 -0000 [thread overview]
Message-ID: <20021203220643.GA20781@doctormoo> (raw)
This does what it says, since everyone keeps mentioning this. :-)
Bootstraps on i686-pc-linux-gnu. I'm going to test a combined tree as well;
nothing should go wrong, since this merely makes explicit the configure
order already present. I also updated some comments and removed a duplicate
entry from the host dirs list.
Configuring host subdirs in the Makefile coming soon I promise. :-)
* Makefile.tpl: Introduce rules to serialize subconfigure runs.
* Makefile.in: Regenerate.
* configure.in: Introduce rules to serialize subconfigure runs.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.111.4.21
diff -u -r1.111.4.21 Makefile.in
--- Makefile.in 3 Dec 2002 21:10:34 -0000 1.111.4.21
+++ Makefile.in 3 Dec 2002 21:42:51 -0000
@@ -4920,6 +4920,11 @@
# all-gcc only depends on all-gas if gas is present and being configured.
@maybe_dependencies@
+# Serialization dependencies. Host configures don't work well in parallel to
+# each other, due to contention over config.cache. Target configures and
+# build configures are similar.
+@serialization_dependencies@
+
# --------------------------------
# Regenerating top level configury
# --------------------------------
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.5.2.19
diff -u -r1.5.2.19 Makefile.tpl
--- Makefile.tpl 3 Dec 2002 21:10:34 -0000 1.5.2.19
+++ Makefile.tpl 3 Dec 2002 21:42:54 -0000
@@ -1289,6 +1289,11 @@
# all-gcc only depends on all-gas if gas is present and being configured.
@maybe_dependencies@
+# Serialization dependencies. Host configures don't work well in parallel to
+# each other, due to contention over config.cache. Target configures and
+# build configures are similar.
+@serialization_dependencies@
+
# --------------------------------
# Regenerating top level configury
# --------------------------------
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.177.4.14
diff -u -r1.177.4.14 configure.in
--- configure.in 3 Dec 2002 21:10:35 -0000 1.177.4.14
+++ configure.in 3 Dec 2002 21:42:57 -0000
@@ -59,10 +59,17 @@
### To add a new directory to the tree, first choose whether it is a target
### or a host dependent tool. Then put it into the appropriate list
-### (library or tools, host or target), doing a dependency sort. For
-### example, gdb requires that byacc (or bison) be built first, so it is in
-### the ${host_tools} list after byacc and bison.
+### (library or tools, host or target), doing a dependency sort.
+# Subdirs will be configured in the order listed in build_configdirs,
+# configdirs, or target_configdirs; see the serialization section below.
+
+# Dependency sorting is only needed when *configuration* must be done in
+# a particular order. In all cases a dependency should be specified in
+# the Makefile, whether or not it's implicitly specified here.
+
+# Double entries in build_configdirs, configdirs, or target_configdirs may
+# cause circular dependencies and break everything horribly.
# these libraries are used by various programs built for the host environment
#
@@ -73,7 +80,7 @@
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
-host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator gettext zip fastjar"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -1433,6 +1440,41 @@
rm -f Makefile
mv -f Makefile.tem Makefile
rm -f maybedep.tmp
+
+# Create the serialization dependencies. This uses a temporary file.
+
+# These force 'configure's to be done one at a time, to avoid problems
+# with contention over a shared config.cache.
+rm -f serdep.tmp
+olditem=
+for item in ${build_configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+ esac
+ olditem=${item}
+done
+olditem=
+for item in ${configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
+ esac
+ olditem=${item}
+done
+olditem=
+for item in ${target_configdirs} ; do
+ case ${olditem} in
+ "") ;;
+ *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
+ esac
+ olditem=${item}
+done
+sed -e '/@serialization_dependencies@/r serdep.tmp' \
+ -e 's/@serialization_dependencies@//' Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
+rm -f serdep.tmp
# Base args. Strip norecursion, cache-file, srcdir, host, build, target.
# These are the ones we might not want to pass down to subconfigures.
next reply other threads:[~2002-12-03 22:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-03 14:07 Nathanael Nerode [this message]
2002-12-03 14:24 ` DJ Delorie
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=20021203220643.GA20781@doctormoo \
--to=neroden@twcny.rr.com \
--cc=binutils@sources.redhat.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sources.redhat.com \
/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