OSDN Git Service

* config/rx/rx.c (rx_is_legitimate_constant): Treat a maximum
[pf3gnuchains/gcc-fork.git] / gcc / doc / sourcebuild.texi
index cce0c41..4cbc36f 100644 (file)
@@ -1,5 +1,5 @@
-@c Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation,
-@c Inc.
+@c Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009
+@c Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -42,6 +42,13 @@ pages from Texinfo manuals as part of the GCC build process.
 An implementation of the @command{jar} command, used with the Java
 front end.
 
+@item fixincludes
+The support for fixing system headers to work with GCC@.  See
+@file{fixincludes/README} for more information.  The headers fixed by
+this mechanism are installed in @file{@var{libsubdir}/include-fixed}.
+Along with those headers, @file{README-fixinc} is also installed, as
+@file{@var{libsubdir}/include-fixed/README}.
+
 @item gcc
 The main sources of GCC itself (except for runtime libraries),
 including optimizers, support for different target architectures,
@@ -51,6 +58,10 @@ language front ends, and testsuites.  @xref{gcc Directory, , The
 @item include
 Headers for the @code{libiberty} library.
 
+@item intl
+GNU @code{libintl}, from GNU @code{gettext}, for systems which do not
+include it in libc.
+
 @item libada
 The Ada runtime library.
 
@@ -82,12 +93,16 @@ The Objective-C and Objective-C++ runtime library.
 @item libstdc++-v3
 The C++ runtime library.
 
+@item lto-plugin
+Plugin used by @command{gold} if link-time optimizations are enabled.
+
 @item maintainer-scripts
 Scripts used by the @code{gccadmin} account on @code{gcc.gnu.org}.
 
 @item zlib
-The @code{zlib} compression library, used by the Java front end and as
-part of the Java runtime library.
+The @code{zlib} compression library, used by the Java front end, as
+part of the Java runtime library, and for compressing and uncompressing
+GCC's intermediate language in LTO object files.
 @end table
 
 The build system in the top level directory, including how recursion
@@ -126,11 +141,12 @@ The @file{gcc} directory contains the following subdirectories:
 @item @var{language}
 Subdirectories for various languages.  Directories containing a file
 @file{config-lang.in} are language subdirectories.  The contents of
-the subdirectories @file{cp} (for C++), @file{objc} (for Objective-C)
-and @file{objcp} (for Objective-C++) are documented in this manual
-(@pxref{Passes, , Passes and Files of the Compiler}); those for other
-languages are not.  @xref{Front End, , Anatomy of a Language Front End},
-for details of the files in these directories.
+the subdirectories @file{cp} (for C++), @file{lto} (for LTO),
+@file{objc} (for Objective-C) and @file{objcp} (for Objective-C++) are
+documented in this manual (@pxref{Passes, , Passes and Files of the
+Compiler}); those for other languages are not.  @xref{Front End, ,
+Anatomy of a Language Front End}, for details of the files in these
+directories.
 
 @item config
 Configuration files for supported architectures and operating
@@ -142,24 +158,12 @@ Texinfo documentation for GCC, together with automatically generated
 man pages and support for converting the installation manual to
 HTML@.  @xref{Documentation}.
 
-@item fixinc
-The support for fixing system headers to work with GCC@.  See
-@file{fixinc/README} for more information.  The headers fixed by this
-mechanism are installed in @file{@var{libsubdir}/include}.  Along with
-those headers, @file{README-fixinc} is also installed, as
-@file{@var{libsubdir}/include/README}.
-
 @item ginclude
 System headers installed by GCC, mainly those required by the C
 standard of freestanding implementations.  @xref{Headers, , Headers
 Installed by GCC}, for details of when these and other headers are
 installed.
 
-@item intl
-GNU @code{libintl}, from GNU @code{gettext}, for systems which do not
-include it in libc.  Properly, this directory should be at top level,
-parallel to the @file{gcc} directory.
-
 @item po
 Message catalogs with translations of messages produced by GCC into
 various languages, @file{@var{language}.po}.  This directory also
@@ -500,6 +504,9 @@ directory.  FIXME: document this further.
 @item
 Details of the directories of any runtime libraries in
 @file{gcc/doc/sourcebuild.texi}.
+@item
+Check targets in Makefile.def for the top-level Makefile to check just
+the compiler or the compiler and runtime library for the language.
 @end itemize
 
 If the front end is added to the official GCC source repository, the
@@ -613,6 +620,8 @@ that should be installed.
 @item install-man
 Install man pages for the front end.  This target should ignore
 errors.
+@item install-plugin
+Install headers needed for plugins.
 @item srcextra
 Copies its dependencies into the source directory.  This generally should
 be used for generated files such as Bison output files which are not
@@ -817,6 +826,7 @@ here; FIXME: document the others.
 * Ada Tests::       The Ada language testsuites.
 * C Tests::         The C language testsuites.
 * libgcj Tests::    The Java library testsuites.
+* LTO Testing::     Support for testing link-time optimizations.
 * gcov Testing::    Support for testing gcov.
 * profopt Testing:: Support for testing profile-directed optimizations.
 * compat Testing::  Support for testing binary compatibility.
@@ -990,6 +1000,26 @@ The target's C99 runtime (both headers and libraries).
 and only then in certain modes.
 @end table
 
+@item @{ dg-timeout @var{n} [@{target @var{selector} @}] @}
+Set the time limit for the compilation and for the execution of the test
+to the specified number of seconds.
+
+@item @{ dg-timeout-factor @var{x} [@{ target @var{selector} @}] @}
+Multiply the normal time limit for compilation and execution of the test
+by the specified floating-point factor.  The normal timeout limit, in
+seconds, is found by searching the following in order:
+
+@itemize @bullet
+@item the value defined by an earlier @code{dg-timeout} directive in
+the test
+
+@item variable @var{tool_timeout} defined by the set of tests
+
+@item @var{gcc},@var{timeout} set in the target board
+
+@item 300
+@end itemize
+
 @item @{ dg-skip-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
 Skip the test if the test system is included in @var{selector} and if
 each of the options in @var{include-opts} is in the set of options with
@@ -1323,6 +1353,42 @@ bugs in libgcj that had caused Mauve test failures.
 
 We encourage developers to contribute test cases to Mauve.
 
+@node LTO Testing
+@subsection Support for testing link-time optimizations
+
+Tests for link-time optimizations usually require multiple source files
+that are compiled separately, perhaps with different sets of options.
+There are several special-purpose test directives used for these tests.
+
+@table @code
+@item @{ dg-lto-do @var{do-what-keyword} @}
+@var{do-what-keyword} specifies how the test is compiled and whether
+it is executed.  It is one of:
+
+@table @code
+@item assemble
+Compile with @option{-c} to produce a relocatable object file.
+@item link
+Compile, assemble, and link to produce an executable file.
+@item run
+Produce and run an executable file, which is expected to return
+an exit code of 0.
+@end table
+
+The default is @code{assemble}.  That can be overridden for a set of
+tests by redefining @code{dg-do-what-default} within the @code{.exp}
+file for those tests.
+
+Unlike @code{dg-do}, @code{dg-lto-do} does not support an optional
+@samp{target} or @samp{xfail} list.  Use @code{dg-skip-if},
+@code{dg-xfail-if}, or @code{dg-xfail-run-if}.
+
+@item @{ dg-lto-options @{ @{ @var{options} @} [@{ @var{options} @}] @} [@{ target @var{selector} @}]@}
+This directive provides a list of one or more sets of compiler options
+to override @var{LTO_OPTIONS}.  Each test will be compiled and run with
+each of these sets of options.
+@end table
+
 @node gcov Testing
 @subsection Support for testing @command{gcov}
 
@@ -1556,9 +1622,9 @@ Finalize use of torture lists.
 @end table
 
 The @file{.exp} file for a set of tests that use torture options must
-include calls to these three procecures if:
+include calls to these three procedures if:
 
-@itemize bullet
+@itemize @bullet
 @item It calls @code{gcc-dg-runtest} and overrides @var{DG_TORTURE_OPTIONS}.
 
 @item It calls @var{$@{tool@}}@code{-torture} or