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 #2 from rob1weld at aol dot com  2007-05-18 03:54 -------
I just read 29544 (against 4.2.0) - as you would say: "what was your (x)gcc -v
?".

I used
"--enable-stage1-checking=assert,fold,gc,gcac,misc,rtl,rtlflag,runtime,tree"
and got these test results:
http://gcc.gnu.org/ml/gcc-testresults/2007-05/msg00812.html


I create a log of the build using "make 2>&1 | tee made_1_log.txt" here is the
line from the log for the _same_ file you made (the file occurs 3 times):


Line 2361:

gcc -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition
-Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H -I. -I.
-I/root/downloads/gcc-4_2-branch/gcc -I/root/downloads/gcc-4_2-branch/gcc/.
-I/root/downloads/gcc-4_2-branch/gcc/../include -I./../intl
-I/root/downloads/gcc-4_2-branch/gcc/../libcpp/include 
-I/root/downloads/gcc-4_2-branch/gcc/../libdecnumber -I../libdecnumber   
/root/downloads/gcc-4_2-branch/gcc/tree-ssa.c -o tree-ssa.o


Line 5802:

/opt/gcc-4_2-build/./prev-gcc/xgcc -B/opt/gcc-4_2-build/./prev-gcc/
-B/usr/i686-pc-linux-gnu/bin/ -c   -O2 -g -fomit-frame-pointer -DIN_GCC   -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I.
-I/root/downloads/gcc-4_2-branch/gcc -I/root/downloads/gcc-4_2-branch/gcc/.
-I/root/downloads/gcc-4_2-branch/gcc/../include -I./../intl
-I/root/downloads/gcc-4_2-branch/gcc/../libcpp/include 
-I/root/downloads/gcc-4_2-branch/gcc/../libdecnumber -I../libdecnumber   
/root/downloads/gcc-4_2-branch/gcc/tree-ssa.c -o tree-ssa.o


Line 9311 of my 'make log' is identical to Line 5802, so I won't repeat it.


If I type "# grep --color=always _CHECKING made_1_log.txt" I can only see
(shortened):

make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH"
"TARGET_SUBDIR=i686-pc-linux-gnu" ...... "STAGE1_CFLAGS=-g
-fkeep-inline-functions"
"STAGE1_CHECKING=--enable-checking=assert,fold,gc,gcac,misc,rtl,rtlflag,runtime,tree"
"STAGE1_LANGUAGES=c,ada" ......

No place in the file does "-DENABLE_CHECKING -DENABLE_ASSERT_CHECKING" occur.


Despite the "mechanics of it" (how it _really_ should work) when I built it
yesterday stage1 was fast, stage2 was slow (but OK - especially since I used
EVERY checking (except valgrind)), and stage3 was fast - the libraries were
quick too. 

It took ~ 32 hours to build. Documented many bugs (which either have been or
will be filed). See URL above.


If I type this, I see:

#cd /opt/gcc-4_2-build
# grep -r --color=always ENABLE_CHECKING *    
gcc/Makefile:STAGE1_CHECKING_CFLAGS = -DENABLE_CHECKING
-DENABLE_ASSERT_CHECKING
gcc/auto-host.h:/* #undef ENABLE_CHECKING */
Binary file gcc/build/genconditions.o matches
Binary file gcc/build/genconditions matches
gcc/build/gencondmd.c:#undef ENABLE_CHECKING
Binary file gcc/build/genextract.o matches
Binary file gcc/build/genextract matches
gcc/insn-extract.c:#ifdef ENABLE_CHECKING


According to the above my "genconditions" and "genextract" execs have the text
fragment "ENABLE_CHECKING" in them. After 20 minutes of grep running I see
nothing else come up in my build directory. But it might have been overwritten.


Back in 4.1.1 the Makefile created directories that looked like this:
...
drwxr-xr-x+ 14 HP_Administrator None      0 May 13 16:09 stage1-gcc
drwxr-xr-x+  2 HP_Administrator None      0 May 13 15:46 stage1-intl
drwxr-xr-x+  4 HP_Administrator None      0 May 13 15:53 stage1-libcpp
drwxr-xr-x+  2 HP_Administrator None      0 May 13 15:54 stage1-libdecnumber
drwxr-xr-x+  3 HP_Administrator None      0 May 13 15:49 stage1-libiberty
drwxr-xr-x+  2 HP_Administrator None      0 May 13 15:52 stage1-zlib
drwxr-xr-x+ 14 HP_Administrator None      0 May 13 18:41 stage2-gcc
drwxr-xr-x+  2 HP_Administrator None      0 May 13 16:14 stage2-intl
drwxr-xr-x+  4 HP_Administrator None      0 May 13 16:52 stage2-libcpp
drwxr-xr-x+  2 HP_Administrator None      0 May 13 16:55 stage2-libdecnumber
drwxr-xr-x+  3 HP_Administrator None      0 May 13 16:41 stage2-libiberty
drwxr-xr-x+  2 HP_Administrator None      0 May 13 16:44 stage2-zlib
drwxr-xr-x+ 14 HP_Administrator None      0 May 13 21:43 stage3-gcc
drwxr-xr-x+  2 HP_Administrator None      0 May 13 18:45 stage3-intl
drwxr-xr-x+  4 HP_Administrator None      0 May 13 19:14 stage3-libcpp
drwxr-xr-x+  2 HP_Administrator None      0 May 13 19:18 stage3-libdecnumber
drwxr-xr-x+  3 HP_Administrator None      0 May 13 19:04 stage3-libiberty
drwxr-xr-x+  2 HP_Administrator None      0 May 16 21:50 stage3-zlib
-rw-r--r--   1 HP_Administrator None      7 May 14 19:53 stage_current
... (that is from 4.2.0 i686-pc-cygwin)


But, now, with 4.2.0 and 4.2.1 Linux builds create directories that look like:
...
drwxr-xr-x 14 root root   12288 May 16 18:15 prev-gcc
drwxr-xr-x  2 root root    1024 May 15 13:53 prev-i686-pc-linux-gnu
drwxr-xr-x  2 root root    1024 May 16 19:38 prev-intl
drwxr-xr-x  4 root root    1024 May 15 14:33 prev-libcpp
drwxr-xr-x  2 root root    1024 May 15 14:35 prev-libdecnumber
drwxr-xr-x  4 root root    2048 May 15 14:19 prev-libiberty
drwxr-xr-x  2 root root    1024 May 15 14:23 prev-zlib
-rwxr-xr-x  1 root root    8020 May 17 10:58 return_fl2.exe
-rw-r--r--  1 root root      13 May 15 12:56 serdep.tmp
drwxr-xr-x 14 root root   11264 May 15 13:53 stage1-gcc
drwxr-xr-x  2 root root    1024 May 15 12:56 stage1-i686-pc-linux-gnu
drwxr-xr-x  2 root root    1024 May 16 19:38 stage1-intl
drwxr-xr-x  4 root root    1024 May 15 13:01 stage1-libcpp
drwxr-xr-x  2 root root    1024 May 15 13:01 stage1-libdecnumber
drwxr-xr-x  4 root root    2048 May 15 12:59 stage1-libiberty
drwxr-xr-x  2 root root    1024 May 15 13:00 stage1-zlib
-rw-r--r--  1 root root       7 May 16 19:38 stage_current
...

Since we don't preserve each stage but instead overwrite it (on the
i686-pc-linux-gnu target) I don't have all my seperate stages so I can check
each one.

It _used_ to be a ./configure option to build "small" to save HD space but now
it seems that it is a default.

Since I _usually_ build for Cygwin and alter my Makefile by hand in accordance
with this procedure: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341 I didn't
notice when the build changed from three _seperate_ stages (+ libs) to three
_overwriting_ stages (occupying 'two positions') (+ libs).

When I build for the target i686-pc-linux-gnu I simply type:
./run_configure.sh    (feeds my huge list of options to ./configure)
make

I don't edit the Makefile or fiddle with anything (that doesn't get a bug
report) - that way I can build GCC the way that many of the maintainers do and
"speak your language". It helps to see how it works on Linux to get my Cygwin
compiles working.


All I know is that stage 2 was slow and the rest was FAST.

I did save directory listings of each stage as it completed if you'd like to
view the build times for the files to verify that ONLY stage TWO was slow and
that all other portions built FAST.

Even if it is NOT supposed to work like that; it is GREAT because using
"--enable-checking=all" is NOT usable / practical.


To "really" get (pseudo) stage ONE checking would we need a FOUR stage build?
- First stage builds GCC using "-DENABLE_CHECKING -DENABLE_ASSERT_CHECKING"
- Second stage builds XGCC using the "checker-gcc" to create a "checking-xgcc"
- Third stage builds the rest of the languages (IE:
non-"STAGE1_LANGUAGES=c,ada")
- Fourth stage builds the final xgcc to create the ".compare" file and build
the ./i686-pc-linux-gnu/libraries


Whatever the situation is: confusion / problem / "correct operation, but
wrongly named" I am CERTAIN that stage2 builds SLOW, and the rest is FAST.

Next time I build for Linux (in a week or two) I will try the Cygwin Makefile
hack on the Linux build to preserve all the three seperate directories and then
I can check if it is fixed and where it breaks.

Do you want my "made_1_log.txt" it is 7 megs long.


-- 


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]