OSDN Git Service

* doc/sourcebuild.texi: Revert previous patch.
[pf3gnuchains/gcc-fork.git] / gcc / doc / sourcebuild.texi
index 5026de7..400634b 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+@c Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -14,7 +14,7 @@ which it is presumed that you are familiar.
 * Configure Terms:: Configuration terminology and history.
 * Top Level::       The top level source directory.
 * gcc Directory::   The @file{gcc} subdirectory.
-* Test Suites::     The GCC test suites.
+* Testsuites::      The GCC testsuites.
 @end menu
 
 @include configterms.texi
@@ -44,13 +44,22 @@ front end.
 @item gcc
 The main sources of GCC itself (except for runtime libraries),
 including optimizers, support for different target architectures,
-language front ends, and test suites.  @xref{gcc Directory, , The
+language front ends, and testsuites.  @xref{gcc Directory, , The
 @file{gcc} Subdirectory}, for details.
 
 @item include
 Headers for the @code{libiberty} library.
 
+@item libada
+The Ada runtime library.
+
+@item libbanshee
+The @code{libbanshee} library, used for Andersen-style points-to analysis.
+
 @item libf2c
+The Fortran 77 runtime library.
+
+@item libgfortran
 The Fortran runtime library.
 
 @item libffi
@@ -65,6 +74,10 @@ about this library.
 @item libjava
 The Java runtime library.
 
+@item libmudflap
+The @code{libmudflap} library, used for instrumenting pointer and array
+dereferencing operations.
+
 @item libobjc
 The Objective-C runtime library.
 
@@ -91,7 +104,7 @@ configure, The GNU configure and build system}, for details.
 The @file{gcc} directory contains many files that are part of the C
 sources of GCC, other files used as part of the configuration and
 build process, and subdirectories including documentation and a
-test suite.  The files that are sources of GCC are documented in a
+testsuite.  The files that are sources of GCC are documented in a
 separate chapter.  @xref{Passes, , Passes and Files of the Compiler}.
 
 @menu
@@ -159,8 +172,8 @@ by @samp{make gcc.pot}, and @file{EXCLUDES}, a list of files from
 which messages should not be extracted.
 
 @item testsuite
-The GCC test suites (except for those for runtime libraries).
-@xref{Test Suites}.
+The GCC testsuites (except for those for runtime libraries).
+@xref{Testsuites}.
 @end table
 
 @node Configuration
@@ -192,8 +205,8 @@ files, kept in the top level directory, are used.  FIXME: when is the
 the top level one) used?
 
 @item The file @file{config.gcc} is used to handle configuration
-specific to the particular target machine.  The file 
-@file{config.build} is used to handle configuration specific to the 
+specific to the particular target machine.  The file
+@file{config.build} is used to handle configuration specific to the
 particular build machine.  The file @file{config.host} is used to handle
 configuration specific to the particular host machine.  (In general,
 these should only be used for features that cannot reasonably be tested in
@@ -276,7 +289,7 @@ headers to work with GCC, some other headers may also be installed in
 @file{config} to be installed on some systems.
 
 GCC installs its own version of @code{<float.h>}, from @file{ginclude/float.h}.
-This is done to cope with command-line options that change the 
+This is done to cope with command-line options that change the
 representation of floating point numbers.
 
 GCC also installs its own version of @code{<limits.h>}; this is generated
@@ -450,6 +463,13 @@ files for that front end.  @xref{Front End Directory, , The Front End
 A mention of the language in the list of supported languages in
 @file{gcc/doc/install.texi}.
 @item
+A mention of the name under which the language's runtime library is
+recognized by @option{--enable-shared=@var{package}} in the
+documentation of that option in @file{gcc/doc/install.texi}.
+@item
+A mention of any special prerequisites for building the front end in
+the documentation of prerequisites in @file{gcc/doc/install.texi}.
+@item
 Details of contributors to that front end in
 @file{gcc/doc/contrib.texi}.  If the details are in that front end's
 own manual then there should be a link to that manual's list in
@@ -468,9 +488,9 @@ Details of source file suffixes for that language and @option{-x
 Entries in @code{default_compilers} in @file{gcc.c} for source file
 suffixes for that language.
 @item
-Preferably test suites, which may be under @file{gcc/testsuite} or
+Preferably testsuites, which may be under @file{gcc/testsuite} or
 runtime library directories.  FIXME: document somewhere how to write
-test suite harnesses.
+testsuite harnesses.
 @item
 Probably a runtime library for the language, outside the @file{gcc}
 directory.  FIXME: document this further.
@@ -565,23 +585,21 @@ FIXME: exactly what goes in each of these targets?
 Build an @command{etags} @file{TAGS} file in the language subdirectory
 in the source tree.
 @item info
-Build info documentation for the front end, in the source directory.
+Build info documentation for the front end, in the build directory.
 This target is only called by @samp{make bootstrap} if a suitable
 version of @command{makeinfo} is available, so does not need to check
-for this, and should fail if an error occurs.  This hook is a
-double-colon hook.
+for this, and should fail if an error occurs.
 @item dvi
 Build DVI documentation for the front end, in the build directory.
 This should be done using @code{$(TEXI2DVI)}, with appropriate
 @option{-I} arguments pointing to directories of included files.
 This hook is a double-colon hook.
-@item generated-manpages
+@item man
 Build generated man pages for the front end from Texinfo manuals
-(@pxref{Man Page Generation}), in the source directory.  This target
+(@pxref{Man Page Generation}), in the build directory.  This target
 is only called if the necessary tools are available, but should ignore
 errors so as not to stop the build if errors occur; man pages are
 optional and the tools involved may be installed in a broken way.
-This hook is a double-colon hook.
 @item install-normal
 FIXME: what is this target for?
 @item install-common
@@ -595,6 +613,18 @@ that should be installed.  This hook is a double-colon hook.
 @item install-man
 Install man pages for the front end.  This target should ignore
 errors.
+@item srcextra
+Copies its dependencies into the source directory.  This generally should
+be used for generated files such as @file{gcc/c-parse.c} which are not
+present in CVS, but should be included in any release tarballs.  This
+target will be executed during a bootstrap if
+@samp{--enable-generated-files-in-srcdir} was specified as a
+@file{configure} option.
+@item srcinfo
+@itemx srcman
+Copies its dependencies into the source directory.  These targets will be
+executed during a bootstrap if @samp{--enable-generated-files-in-srcdir}
+was specified as a @file{configure} option.
 @item uninstall
 Uninstall files installed by installing the compiler.  This is
 currently documented not to be supported, so the hook need not do
@@ -687,6 +717,10 @@ If defined, a space-separated list of files that should be scanned by
 gengtype.c to generate the garbage collection tables and routines for
 this language.  This excludes the files that are common to all front
 ends. @xref{Type Information}.
+@item need_gmp
+If defined  to @samp{yes}, this frontend requires the GMP library.
+Enables configure tests for GMP, which set @code{GMPLIBS} and
+@code{GMPINC} appropriately.
 
 @end table
 
@@ -758,6 +792,9 @@ following are also necessary:
 An entry for the target architecture in @file{readings.html} on the
 GCC web site, with any relevant links.
 @item
+Details of the properties of the back end and target architecture in
+@file{backends.html} on the GCC web site.
+@item
 A news item about the contribution of support for that target
 architecture, in @file{index.html} on the GCC web site.
 @item
@@ -767,40 +804,44 @@ but it would be unusual to add support for a target that does not have
 a maintainer when support is added.
 @end itemize
 
-@node Test Suites
-@section Test Suites
+@node Testsuites
+@section Testsuites
 
-GCC contains several test suites to help maintain compiler quality.
-Most of the runtime libraries and language front ends in GCC have test
-suites.  Currently only the C language test suites are documented
+GCC contains several testsuites to help maintain compiler quality.
+Most of the runtime libraries and language front ends in GCC have
+testsuites.  Currently only the C language testsuites are documented
 here; FIXME: document the others.
 
 @menu
-* Test Idioms::     Idioms used in test suite code.
-* Ada Tests::       The Ada language test suites.
-* C Tests::         The C language test suites.
-* libgcj Tests::    The Java library test suites.
+* Test Idioms::     Idioms used in testsuite code.
+* Ada Tests::       The Ada language testsuites.
+* C Tests::         The C language testsuites.
+* libgcj Tests::    The Java library testsuites.
 * gcov Testing::    Support for testing gcov.
 * profopt Testing:: Support for testing profile-directed optimizations.
 * compat Testing::  Support for testing binary compatibility.
 @end menu
 
 @node Test Idioms
-@subsection Idioms Used in Test Suite Code
-
-In the @file{gcc.c-torture} test suites, test cases are commonly named
-after the date on which they were added.  This allows people to tell
-at a glance whether a test failure is because of a recently found bug
-that has not yet been fixed, or whether it may be a regression.  In
-other test suites, more descriptive names are used.  In general C test
-cases have a trailing @file{-@var{n}.c}, starting with @file{-1.c}, in
-case other test cases with similar names are added later.
-
-Test cases should use @code{abort ()} to indicate failure and
-@code{exit (0)} for success; on some targets these may be redefined to
-indicate failure and success in other ways.
-
-In the @file{gcc.dg} test suite, it is often necessary to test that an
+@subsection Idioms Used in Testsuite Code
+
+In general C testcases have a trailing @file{-@var{n}.c}, starting
+with @file{-1.c}, in case other testcases with similar names are added
+later.  If the test is a test of some well-defined feature, it should
+have a name referring to that feature such as
+@file{@var{feature}-1.c}.  If it does not test a well-defined feature
+but just happens to exercise a bug somewhere in the compiler, and a
+bug report has been filed for this bug in the GCC bug database,
+@file{pr@var{bug-number}-1.c} is the appropriate form of name.
+Otherwise (for miscellaneous bugs not filed in the GCC bug database),
+and previously more generally, test cases are named after the date on
+which they were added.  This allows people to tell at a glance whether
+a test failure is because of a recently found bug that has not yet
+been fixed, or whether it may be a regression, but does not give any
+other information about the bug or where discussion of it may be
+found.  Some other language testsuites follow similar conventions.
+
+In the @file{gcc.dg} testsuite, it is often necessary to test that an
 error is indeed a hard error and not just a warning---for example,
 where it is a constraint violation in the C standard, which must
 become an error with @option{-pedantic-errors}.  The following idiom,
@@ -858,20 +899,21 @@ All testcases must be portable.  Target-specific testcases must have
 appropriate code to avoid causing failures on unsupported systems;
 unfortunately, the mechanisms for this differ by directory.
 
-FIXME: discuss non-C test suites here.
+FIXME: discuss non-C testsuites here.
 
 @node Ada Tests
-@subsection Ada Language Test Suites
+@subsection Ada Language Testsuites
 
-The Ada test suite includes executable tests from the ACATS 2.5 test
-suite, publicly available at @uref{http://www.adaic.org/compilers/acats/2.5}
+The Ada testsuite includes executable tests from the ACATS 2.5
+testsuite, publicly available at
+@uref{http://www.adaic.org/compilers/acats/2.5}
 
-These tests are integrated in the GCC test suite in the
+These tests are integrated in the GCC testsuite in the
 @file{gcc/testsuite/ada/acats} directory, and
 enabled automatically when running @code{make check}, assuming
 the Ada language has been enabled when configuring GCC.
 
-You can also run the Ada test suite independently, using
+You can also run the Ada testsuite independently, using
 @code{make check-ada}, or run a subset of the tests by specifying which
 chapter to run, e.g:
 
@@ -894,20 +936,20 @@ These tests are run using the build tree: they can be run without doing
 a @code{make install}.
 
 @node C Tests
-@subsection C Language Test Suites
+@subsection C Language Testsuites
 
-GCC contains the following C language test suites, in the
+GCC contains the following C language testsuites, in the
 @file{gcc/testsuite} directory:
 
 @table @file
 @item gcc.dg
-This contains tests of particular features of the C compiler, using the 
+This contains tests of particular features of the C compiler, using the
 more modern @samp{dg} harness.  Correctness tests for various compiler
 features should go here if possible.
 
-Magic comments determine whether the file 
-is preprocessed, compiled, linked or run.  In these tests, error and warning 
-message texts are compared against expected texts or regular expressions 
+Magic comments determine whether the file
+is preprocessed, compiled, linked or run.  In these tests, error and warning
+message texts are compared against expected texts or regular expressions
 given in comments.  These tests are run with the options @samp{-ansi -pedantic}
 unless other options are given in the test.  Except as noted below they
 are not run with multiple optimization options.
@@ -936,7 +978,7 @@ FIXME: describe this.
 This contains particular code fragments which have historically broken easily.
 These tests are run with multiple optimization options, so tests for features
 which only break at some optimization levels belong here.  This also contains
-tests to check that certain optimizations occur.  It might be worthwhile to 
+tests to check that certain optimizations occur.  It might be worthwhile to
 separate the correctness tests cleanly from the code quality tests, but
 it hasn't been done yet.
 
@@ -945,7 +987,7 @@ FIXME: describe this.
 
 This directory should probably not be used for new tests.
 @item gcc.c-torture/compile
-This test suite contains test cases that should compile, but do not
+This testsuite contains test cases that should compile, but do not
 need to link or run.  These test cases are compiled with several
 different combinations of optimization options.  All warnings are
 disabled for these test cases, so this directory is not suitable if
@@ -955,7 +997,7 @@ platforms, by the use of @file{.x} files, mostly these test cases
 should not contain platform dependencies.  FIXME: discuss how defines
 such as @code{NO_LABEL_VALUES} and @code{STACK_SIZE} are used.
 @item gcc.c-torture/execute
-This test suite contains test cases that should compile, link and run;
+This testsuite contains test cases that should compile, link and run;
 otherwise the same comments as for @file{gcc.c-torture/compile} apply.
 @item gcc.c-torture/execute/ieee
 This contains tests which are specific to IEEE floating point.
@@ -992,14 +1034,14 @@ FIXME: merge in @file{testsuite/README.gcc} and discuss the format of
 test cases and magic comments more.
 
 @node libgcj Tests
-@subsection The Java library test suites.
+@subsection The Java library testsuites.
 
 Runtime tests are executed via @samp{make check} in the
 @file{@var{target}/libjava/testsuite} directory in the build
 tree.  Additional runtime tests can be checked into this testsuite.
 
 Regression testing of the core packages in libgcj is also covered by the
-Mauve test suite.  The @uref{http://sources.redhat.com/mauve/,,Mauve Project}
+Mauve testsuite.  The @uref{http://sources.redhat.com/mauve/,,Mauve Project}
 develops tests for the Java Class Libraries.  These tests are run as part
 of libgcj testing by placing the Mauve tree within the libjava testsuite
 sources at @file{libjava/testsuite/libjava.mauve/mauve}, or by specifying
@@ -1013,8 +1055,8 @@ Update this file when adding new failing tests to Mauve, or when fixing
 bugs in libgcj that had caused Mauve test failures.
 
 The @uref{http://oss.software.ibm.com/developerworks/opensource/jacks/,,
-Jacks} project provides a test suite for Java compilers that can be used
-to test changes that affect the GCJ front end.  This test suite is run as
+Jacks} project provides a testsuite for Java compilers that can be used
+to test changes that affect the GCJ front end.  This testsuite is run as
 part of Java testing by placing the Jacks tree within the the libjava
 testsuite sources at @file{libjava/testsuite/libjava.jacks/jacks}.
 
@@ -1109,7 +1151,7 @@ about a specific optimization:
 
 @table @code
 @item tool
-tool being tested, e.g., gcc
+tool being tested, e.g., @command{gcc}
 
 @item profile_option
 options used to generate profile data
@@ -1129,11 +1171,10 @@ torture tests
 @subsection Support for testing binary compatibility
 
 The file @file{compat.exp} provides language-independent support for
-binary compatibility testing.  It supports testing interoperability
-of two compilers that follow the same ABI, or of multiple sets of
-compiler options that should not affect binary compatibility.
-It is intended to be used for test suites that complement ABI test
-suites.
+binary compatibility testing.  It supports testing interoperability of
+two compilers that follow the same ABI, or of multiple sets of
+compiler options that should not affect binary compatibility.  It is
+intended to be used for testsuites that complement ABI testsuites.
 
 A test supported by this framework has three parts, each in a
 separate source file: a main program and two pieces that interact