On 9 July 2010 06:41, BLUE 3TOO wrote: > > Hi, > > I have following questions and would appreciate any comment. Thanks you > very much. > > 1. How to build a debugable version of GCC? I tried to set CFLGAS & > CXXFLAGS to "-O0 -g -fno-inline" in my configure command line, but it seems > it doesn't work. I manually modify all the Makefiles in gcc sub-directories > and replace "-O2" with "-O0 -g", it is dumb but works. I guess there is a > better way that I am not aware of. Can anybody tell me how to do it?
See http://gcc.gnu.org/wiki/DebuggingGCC > 2. during the "make" process, i noticed it enters > gcc-4.5.0/host-i686-pc-cygwin/gcc and build the same source files three times: > > E.g. first time: gcc .././gcc/c-typeck.c -o c-typeck.o > 2nd time: xgcc -O2 -gtoggle .././gcc/c-typeck.c -o c-typeck.o > 3rd time: xgcc -O2 -DIN_GCC .././gcc/c-typeck.c -o c-typeck.o > Can anybody tells me what these compilation for? Seems that the first > one is building gcc, how about 2nd and 3rd one? thanks See the description of 3-stage bootstrap at http://gcc.gnu.org/install/build.html#TOC0 > 3. what is libgcc and newlib for? > > 4. what are these directories for? > prev-i686-pc-cygwin/ > stage1-i686-pc-cygwin/ > > > 5. what is libssp for? what is lto-plugin for? The different sub-directories are (briefly) described at http://gcc.gnu.org/onlinedocs/gccint/Top-Level.html