This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [toplevel bootstrap PATCH] Add profiledbootstrap


With the information given about the portability of double-colon rules,
I can approve this.  So I do.  Please commit.

 
2004-05-29  Paolo Bonzini  <bonzini@gnu.org>

        * Makefile.def: Add profile and feedback bootstrap stages.
        Remove next field from bootstrap stages.
        * Makefile.tpl (LN, LN_S): Substitute.
        (stageN-start, stageN-end): Use double-colon rules, to
        provide a hook for additional setup commands.
        (distclean-stageN-gcc, restageN): Create dependencies from
        [+prev+], not from [+next+].
        (stageN-bubble): Add commands for successive stages from
        [+prev+], using double-colon rules.
        (all-stageN-gcc): Fix typo.
        (stagefeedback-start, profiledbootstrap): New.
        * Makefile.in: Regenerate.
        * configure.in: Call ACX_PROG_LN.
        * configure: Regenerate.

config/ChangeLog:
2004-05-29  Paolo Bonzini  <bonzini@gnu.org>

        * config/acx.m4 (ACX_PROG_LN): New macro.

gcc/ChangeLog:
2004-05-29  Paolo Bonzini  <bonzini@gnu.org>

        * aclocal.m4 (gcc_AC_PROG_LN): Remove.
        * configure.ac: Call ACX_PROG_LN, falling back to $LN_S
        if hard links are not available.
        * configure: Regenerate.

Sometime I'll probably run some more cosmetic cleanup passes on the Makefile.
In case you want to preempt me, here's what I'd do:

(1)  Separate out all the bootstrap targets which call Make recursively on
the same toplevel Makefile into one list, so they can easily be distinguished
from those which don't.  This way, they effectively form a 'higher level'
Makefile; all rules are either at the 'upper level' or the regular level,
never both, and there are only a fixed number of levels.  This increases
maintainability by a surprisingly large factor.

(2) Document all shell variables which are expected to be set when various
Make macros or autoconf substitutions are used in a Make rule.

(3) Make some of the nastier stuff more readable, one way or another.
For instance, this is a readability nightmare:
+         { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
+         { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
but the logic isn't really that complicated.  If it can't be transformed into
a more readable form, it deserves a comment explaining what it's doing.
("Copy all *.*da files from the old directory tree to the new one")

(4) Clean up the stylistic issues with the various LN checks in configure;
ideally there should be one argument-free checking macro for each functional
thing we might try to do, and it isn't that way right now.

-- 
There are none so blind as those who will not see.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]