]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/doc/fragments.texi
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / doc / fragments.texi
index f9ef3d22b82ff7e2fc19fbfa62f91ec59fea9913..ff89d513d49168c5a8cc13299b171f2feec68f6e 100644 (file)
@@ -1,5 +1,5 @@
 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001 Free Software Foundation, Inc.
+@c 1999, 2000, 2001, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -13,7 +13,8 @@ construct the file @file{Makefile} from the template file
 fragments from the @file{config} directory.  These are used to set
 Makefile parameters that are not amenable to being calculated by
 autoconf.  The list of fragments to incorporate is set by
-@file{config.gcc}; @xref{System Config}.
+@file{config.gcc} (and occasionally @file{config.build}
+and @file{config.host}); @xref{System Config}.
 
 Fragments are named either @file{t-@var{target}} or @file{x-@var{host}},
 depending on whether they are relevant to configuring GCC to produce
@@ -134,12 +135,12 @@ specified, there are combinations that should not be built.  In that
 case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
 in shell case syntax that should not be built.
 
-For example, in the PowerPC embedded ABI support, it is not desirable
-to build libraries compiled with the @option{-mcall-aix} option
-and either of the @option{-fleading-underscore} or @option{-mlittle} options
-at the same time.  Therefore @code{MULTILIB_EXCEPTIONS} is set to
+For example the ARM processor cannot execute both hardware floating
+point instructions and the reduced size THUMB instructions at the same
+time, so there is no need to build libraries with both of these
+options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
 @smallexample
-*mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
+*mthumb/*mhard-float*
 @end smallexample
 
 @findex MULTILIB_EXTRA_OPTS
@@ -147,7 +148,35 @@ at the same time.  Therefore @code{MULTILIB_EXCEPTIONS} is set to
 Sometimes it is desirable that when building multiple versions of
 @file{libgcc.a} certain options should always be passed on to the
 compiler.  In that case, set @code{MULTILIB_EXTRA_OPTS} to be the list
-of options to be used for all builds.
+of options to be used for all builds.  If you set this, you should
+probably set @code{CRTSTUFF_T_CFLAGS} to a dash followed by it.
+
+@findex NATIVE_SYSTEM_HEADER_DIR
+@item NATIVE_SYSTEM_HEADER_DIR
+If the default location for system headers is not @file{/usr/include},
+you must set this to the directory containing the headers.  This value
+should match the value of the @code{SYSTEM_INCLUDE_DIR} macro.
+
+@findex SPECS
+@item SPECS
+Unfortunately, setting @code{MULTILIB_EXTRA_OPTS} is not enough, since
+it does not affect the build of target libraries, at least not the
+build of the default multilib.  One possible work-around is to use
+@code{DRIVER_SELF_SPECS} to bring options from the @file{specs} file
+as if they had been passed in the compiler driver command line.
+However, you don't want to be adding these options after the toolchain
+is installed, so you can instead tweak the @file{specs} file that will
+be used during the toolchain build, while you still install the
+original, built-in @file{specs}.  The trick is to set @code{SPECS} to
+some other filename (say @file{specs.install}), that will then be
+created out of the built-in specs, and introduce a @file{Makefile}
+rule to generate the @file{specs} file that's going to be used at
+build time out of your @file{specs.install}.
+
+@item T_CFLAGS
+These are extra flags to pass to the C compiler.  They are used both
+when building GCC, and when compiling things with the just-built GCC@.
+This variable is deprecated and should not be used.
 @end table
 
 @node Host Fragment
@@ -155,36 +184,5 @@ of options to be used for all builds.
 @cindex host makefile fragment
 @cindex @file{x-@var{host}}
 
-The use of @file{x-@var{host}} fragments is discouraged.  You should do
-so only if there is no other mechanism to get the behavior desired.
-Host fragments should never forcibly override variables set by the
-configure script, as they may have been adjusted by the user.
-
-Variables provided for host fragments to set include:
-
-@table @code
-
-@item X_CFLAGS
-@itemx X_CPPFLAGS
-These are extra flags to pass to the C compiler and preprocessor,
-respectively.  They are used both when building GCC, and when compiling
-things with the just-built GCC.
-
-@item XCFLAGS
-These are extra flags to use when building the compiler.  They are not
-used when compiling @file{libgcc.a}.  However, they @emph{are} used when
-recompiling the compiler with itself in later stages of a bootstrap.
-
-@item BOOT_LDFLAGS
-Flags to be passed to the linker when recompiling the compiler with
-itself in later stages of a bootstrap.  You might need to use this if,
-for instance, one of the front ends needs more text space than the
-linker provides by default.
-
-@item EXTRA_PROGRAMS
-A list of additional programs required to use the compiler on this host,
-which should be compiled with GCC and installed alongside the front
-ends.  If you set this variable, you must also provide rules to build
-the extra programs.
-
-@end table
+The use of @file{x-@var{host}} fragments is discouraged.  You should only
+use it for makefile dependencies.