gccint: Makefile

1 
1 6.3.4 Makefile Targets
1 ----------------------
1 
1 These targets are available from the 'gcc' directory:
1 
1 'all'
1      This is the default target.  Depending on what your
1      build/host/target configuration is, it coordinates all the things
1      that need to be built.
1 
1 'doc'
1      Produce info-formatted documentation and man pages.  Essentially it
1      calls 'make man' and 'make info'.
1 
1 'dvi'
1      Produce DVI-formatted documentation.
1 
1 'pdf'
1      Produce PDF-formatted documentation.
1 
1 'html'
1      Produce HTML-formatted documentation.
1 
1 'man'
1      Generate man pages.
1 
1 'info'
1      Generate info-formatted pages.
1 
1 'mostlyclean'
1      Delete the files made while building the compiler.
1 
1 'clean'
1      That, and all the other files built by 'make all'.
1 
1 'distclean'
1      That, and all the files created by 'configure'.
1 
1 'maintainer-clean'
1      Distclean plus any file that can be generated from other files.
1      Note that additional tools may be required beyond what is normally
1      needed to build GCC.
1 
1 'srcextra'
1      Generates files in the source directory that are not
1      version-controlled but should go into a release tarball.
1 
1 'srcinfo'
1 'srcman'
1      Copies the info-formatted and manpage documentation into the source
1      directory usually for the purpose of generating a release tarball.
1 
1 'install'
1      Installs GCC.
1 
1 'uninstall'
1      Deletes installed files, though this is not supported.
1 
1 'check'
1      Run the testsuite.  This creates a 'testsuite' subdirectory that
1      has various '.sum' and '.log' files containing the results of the
1      testing.  You can run subsets with, for example, 'make check-gcc'.
1      You can specify specific tests by setting 'RUNTESTFLAGS' to be the
1      name of the '.exp' file, optionally followed by (for some tests) an
1      equals and a file wildcard, like:
1 
1           make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
1 
1      Note that running the testsuite may require additional tools be
1      installed, such as Tcl or DejaGnu.
1 
1  The toplevel tree from which you start GCC compilation is not the GCC
1 directory, but rather a complex Makefile that coordinates the various
1 steps of the build, including bootstrapping the compiler and using the
1 new compiler to build target libraries.
1 
1  When GCC is configured for a native configuration, the default action
1 for 'make' is to do a full three-stage bootstrap.  This means that GCC
1 is built three times--once with the native compiler, once with the
1 native-built compiler it just built, and once with the compiler it built
1 the second time.  In theory, the last two should produce the same
1 results, which 'make compare' can check.  Each stage is configured
1 separately and compiled into a separate directory, to minimize problems
1 due to ABI incompatibilities between the native compiler and GCC.
1 
1  If you do a change, rebuilding will also start from the first stage and
1 "bubble" up the change through the three stages.  Each stage is taken
1 from its build directory (if it had been built previously), rebuilt, and
1 copied to its subdirectory.  This will allow you to, for example,
1 continue a bootstrap after fixing a bug which causes the stage2 build to
1 crash.  It does not provide as good coverage of the compiler as
1 bootstrapping from scratch, but it ensures that the new code is
1 syntactically correct (e.g., that you did not use GCC extensions by
1 mistake), and avoids spurious bootstrap comparison failures(1).
1 
1  Other targets available from the top level include:
1 
1 'bootstrap-lean'
1      Like 'bootstrap', except that the various stages are removed once
1      they're no longer needed.  This saves disk space.
1 
1 'bootstrap2'
1 'bootstrap2-lean'
1      Performs only the first two stages of bootstrap.  Unlike a
1      three-stage bootstrap, this does not perform a comparison to test
1      that the compiler is running properly.  Note that the disk space
1      required by a "lean" bootstrap is approximately independent of the
1      number of stages.
1 
1 'stageN-bubble (N = 1...4, profile, feedback)'
1      Rebuild all the stages up to N, with the appropriate flags,
1      "bubbling" the changes as described above.
1 
1 'all-stageN (N = 1...4, profile, feedback)'
1      Assuming that stage N has already been built, rebuild it with the
1      appropriate flags.  This is rarely needed.
1 
1 'cleanstrap'
1      Remove everything ('make clean') and rebuilds ('make bootstrap').
1 
1 'compare'
1      Compares the results of stages 2 and 3.  This ensures that the
1      compiler is running properly, since it should produce the same
1      object files regardless of how it itself was compiled.
1 
1 'profiledbootstrap'
1      Builds a compiler with profiling feedback information.  In this
1      case, the second and third stages are named 'profile' and
1      'feedback', respectively.  For more information, see the
1      installation instructions.
1 
1 'restrap'
1      Restart a bootstrap, so that everything that was not built with the
1      system compiler is rebuilt.
1 
1 'stageN-start (N = 1...4, profile, feedback)'
1      For each package that is bootstrapped, rename directories so that,
1      for example, 'gcc' points to the stageN GCC, compiled with the
1      stageN-1 GCC(2).
1 
1      You will invoke this target if you need to test or debug the stageN
1      GCC.  If you only need to execute GCC (but you need not run 'make'
1      either to rebuild it or to run test suites), you should be able to
1      work directly in the 'stageN-gcc' directory.  This makes it easier
1      to debug multiple stages in parallel.
1 
1 'stage'
1      For each package that is bootstrapped, relocate its build directory
1      to indicate its stage.  For example, if the 'gcc' directory points
1      to the stage2 GCC, after invoking this target it will be renamed to
1      'stage2-gcc'.
1 
1  If you wish to use non-default GCC flags when compiling the stage2 and
1 stage3 compilers, set 'BOOT_CFLAGS' on the command line when doing
1 'make'.
1 
1  Usually, the first stage only builds the languages that the compiler is
1 written in: typically, C and maybe Ada.  If you are debugging a
1 miscompilation of a different stage2 front-end (for example, of the
1 Fortran front-end), you may want to have front-ends for other languages
1 in the first stage as well.  To do so, set 'STAGE1_LANGUAGES' on the
1 command line when doing 'make'.
1 
1  For example, in the aforementioned scenario of debugging a Fortran
1 front-end miscompilation caused by the stage1 compiler, you may need a
1 command like
1 
1      make stage2-bubble STAGE1_LANGUAGES=c,fortran
1 
1  Alternatively, you can use per-language targets to build and test
1 languages that are not enabled by default in stage1.  For example, 'make
1 f951' will build a Fortran compiler even in the stage1 build directory.
1 
1    ---------- Footnotes ----------
1 
1    (1) Except if the compiler was buggy and miscompiled some of the
1 files that were not modified.  In this case, it's best to use 'make
1 restrap'.
1 
1    (2) Customarily, the system compiler is also termed the 'stage0' GCC.
1