This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Please *bootstrap* patches
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Steven Bosscher" <stevenb at suse dot de>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 21 Sep 2004 15:25:48 +0200
- Subject: Re: Please *bootstrap* patches
- References: <1399152.1095758329809.SLOX.WebMail.wwwrun@extimap.suse.de>
Steven Bosscher wrote:
> cc1: warnings being treated as errors
> ../../mainline/gcc/cp/decl.c: In function 'reshape_init':
> ../../mainline/gcc/cp/decl.c:4162: warning: 'max_index_cst' may be
> used uninitialized in this function
> make[2]: *** [cp/decl.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
>
> This is probably Giovanni's patch. Two days ago bootstrap failed
> because Jeff decided to write fun () instead of fun (void).
>
> Apparently people don't bootstrap patches, or these mistakes would
> have been detected before patches got commited.
Yes, this was my patch. While I sympathize with your sentiment, I must notice
that there is no official need to bootstrap a C++ only patch (a patch affecting
only files in cp/). In fact, our official rules at
http://gcc.gnu.org/contribute.html say:
---------- QUOTE ----------
If your change is to the C++ front end, you should rebuild the compiler,
libstdc++, libjava and run the C++ testsuite. If you already did a complete
C,C++,Java bootstrap from your build directory before, you can use the
following:
make clean-target-libstdc++-v3 # clean libstdc++ and ...
test -d */libjava && make -C */libjava clean-nat # ... parts of libjava
make all-target-libstdc++-v3 all-target-libjava # rebuild compiler and
libraries
make -k check-c++ # run C++/libstdc++ testsuite
---------- UNQUOTE ----------
This was suggested by Jason Merrill. If this procedure does not
activate -Werror, then it is a problem of our contribution rules, which I
follow literally. When I invoke "make all-gcc" on my patched decl.c, I see the
following command lines:
gcc -c -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pro
totypes -fno-common -DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc
/gcc/cp -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
../../gcc/gcc/cp/decl.c -o cp/decl.o
gcc -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-protot
ypes -fno-common -DHAVE_CONFIG_H -o cc1plus \
cp/cp-lang.o stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o
cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o
cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o
cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o
cp/cp-gimplify.o tree-mudflap.o attribs.o c-common.o c-format.o c-pragma.o
c-semantics.o c-lex.o c-dump.o c-pretty-print.o c-opts.o c-pch.o c-incpath.o
cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-gimplify.o tree-inline.o
main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a
../libiberty/libiberty.a
So there are two problems here: First, there is no -Werror. Second, there is no
warning at all. This is probably caused by the fact that "make all-gcc" uses
the default compiler and not the bootstrapped one. Maybe the make target should
be changed to something like "make stage3", I surely don't know the details.
Can some makefile guru comment on this?
> So, *please*, can people *bootstrap* their patches, and make sure
> this kind of mistake does not happen again?
I would like to add that I rarely contribute anything outside the C++ FE for
several reasons, including expertice (of course) but also very limited testing
resources. So deleting the above quoted lines from contribute.html, thus
forcing a full bootstrap to test C++-only changes would be a good way to
prevent me from doing any work on GCC.
Giovanni Bajo