This is the mail archive of the gcc-bugs@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]

[Bug bootstrap/31963] The configure option "--enable-stage1-checking" is undocumented (and incorrectly named)



------- Comment #4 from rob1weld at aol dot com  2007-05-18 05:57 -------
>> ------- Comment #3 From Andrew Pinski 2007-05-18 04:10 [reply] ------- 
>> I have no idea what you are talking about overwritting. 

In the 4.1.1 AND 4.2.0/1 configure file we have:
--enable-bootstrap[=lean]     Enable bootstrapping [no]

In the 4.1.1 AND 4.2.0/1 gcc/doc/gccinstall.info file we have:
   If you are short on disk space you might consider `make
bootstrap-lean' instead.  This is identical to `make bootstrap' except
that object files from the stage1 and stage2 of the 3-stage bootstrap
of the compiler are deleted as soon as they are no longer needed.

The DOCs are the same but the way the stages build are different. See my "ls
-l" above. 


- The 4.1.1   Makefile _leaves_ all the stages _after_ the make is finished.
--- We end up with "stage1-gcc", "stage2-gcc" and "stage3-gcc" (and the other
directories).


- The 4.2.0/1 Makefile  _moves_ all the stages _after_ each stage - this is
"_similar_" to a "lean" bootstrap but instead of "rm" (deleting is the word
used in the info DOCs above) the stages are moved (overwrite the prior stage)
by shuffling the links.

--- We end up with "gcc", and "prev-gcc" (and the other directories) - We have
fewer directories - IE: no intermediates to examine.


>>>> ------- Comment #3 From Andrew Pinski 2007-05-18 04:10 [reply] ------- 
>> So that means we can configure the gcc subdirectory differently for the two different stages which is exactly what happens with --enable-stage1-checking=*.  When stage1 is configured, the toplevel makefile passes down the --enable-checking=x for what --enable-stage1-checking= says to do (defaults to yes).  So you will not see a -DENABLE_CHECKING on the command line when compiling stage1 at all.  You will see in stage1-gcc (when the build finishes if you don't use make bootstrap-lean) in auto-host.h, a define for ENABLE_CHECKING.  This option is really only useful for disable checking for stage1 when you are short on resources (memory/time).


I used "make" to make gcc - I saved the whole log of the make when I typed:
"make 2>&1 | tee made_1_log.txt"

I also saved "ls -l" 's  of each stage of the build to compare how long it took
to compile with the "--enable-stage1-checking=..." option fed _directly_ to
./configure and the "--enable-checking" option NOT given to ./configure .


When I previously used "--enable-checking" it took way too long, the worst part
was the libjava libraries (since they have PICs and use @lists).

I tried using "--enable-stage1-checking" instead of using "--enable-checking"
with _every_ possible check (except valgrind) - It was "quite fast".


>> ------- Comment #3 From Andrew Pinski 2007-05-18 04:10 [reply] ------- 
>> Plus configure is setup correctly to enable more checking for stage1.  Also
>> this is the help from configure:
>> choose additional checking for stage1 of the compiler.
>> 
>> Which is exactly what it does.  It means enable checking in the product of
>> stage1 (the stage1 compiler) which is a good description I think.  It means
>> compiling stage2 is going to be slower if you enable all checking for stage1.

When we use the command "./configure --enable-stage1-checking=all" we are
building the stage1 compiler with the operating system's gcc which (most
likely) was NOT compiled with "*-checking=all" -- _IF_ the OS's gcc compiler
_was_ compiled with checking then when we used the OS's gcc to compile we would
get additional checks made on the OS's gcc output (whether we configured the
SVN we are building to have checking or not).

If our OS has only gcc-3.3 installed and we want to build GCC 4.2.0/1 the
_first_ stage will not be built with the features available in gcc4.

When we make bootstrap and use "gcc/xgcc" during the _second_ (and subsequent)
stages we _DO_ use gcc4 and _if_ we turned on "the use of checking" then the
gcc built in stage1 (which then gets called gcc/xgcc in stage2) will build
stage TWO with checking - stage ONE is only built with checking _IF_ the OS's
gcc was built with checking (sometimes scoundrels build and release binaries
with --disable-checking).



So the stage ONE compiler we build has the ABILITY to check stage TWO (and
later stages depending if we use "--enable-checking" or
"--enable-stage1-checking" - but it does not have itself checked (there is no
stage ONE checking)


Similarly I can use gcc-3.3 to build GCC-5.0.0-branch (maybe) and I can build
gcc5 with every command line option and feature _supported_ by gcc3 - if I
configure GCC5 to use gomp the FIRST stage of GCC5 is not going to have gomp.

If I built GCC5 with GCC4 (and configured GCC4 using --enable-libgomp) then
stage ONE of GCC5 _could_ be built with gomp.


You say the DOCs say:
choose additional checking for stage1 of the compiler.

If I tell you "the FIRST time you come to my restraunt I will give you a free
meal" does that mean you need to come a second time to get the meal ?

If I tell you "the SECOND time you come to my restraunt I will give you a free
meal" does that mean you need to come a FIRST time prior to coming a SECOND
time - or can you just skip the first time and come the second time right away?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31963


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