This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [toplevel] Toplevel bootstrap fixes 2/4, bootstrap-lean
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 03 Jan 2006 23:34:09 -0200
- Subject: Re: [toplevel] Toplevel bootstrap fixes 2/4, bootstrap-lean
- References: <43A917CA.6050302@lu.unisi.ch> <doe91o$e0t$1@sea.gmane.org>
On Dec 22, 2005, Paolo Bonzini <bonzini@gnu.org> wrote:
> Paolo Bonzini wrote:
>> This patch implements bootstrap-lean for the new toplevel bootstrap.
>> It is simple to do it by passing recursively a variable which is set
>> to either ":" (for non-lean bootstraps) or the empty string (for
>> lean bootstraps).
>> All bootstrap targets have a `lean' variation, even `bootstrap2'.
>> With this patch, as a small benefit over GCC-directory bootstrap, we
>> get profiledbootstrap-lean.
> Yesterday I forgot the patch and then the battery power exhausted
> before I could pick it up and send it, so gere it is. I also tested
> it with a "make -j4 bootstrap-lean" to cover the possibility of race
> conditions.
> It applies on top of part 3/4, and I tested them together.
> Ok for gcc/src?
> +# Disable commands for lean bootstrap.
> +NOT_LEAN=#
I'm pretty sure this will not do what you want in the case below:
> - $(MAKE) stage[+id+]-start; \
> + $(MAKE) stage[+id+]-start; \[+IF lean +]
> + $(NOT_LEAN) rm -rf stage[+lean+]-* ; \
> + $(NOT_LEAN) $(STAMP) stage[+lean+]-lean ; \[+ ENDIF lean +]
> $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
> fi[+ IF compare-target +]
When you have shell comments within Makefile line continuations, at
least some makes will ellide `\\\n' so the whole thing will turn into:
cmd ; # cmd; # cmd; fi
and then you'll get an unterminated if/then/else/fi sequence. You
should probably go back to using `:' as in the textual description.
Other than that, it looks good to me.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}