]> gcc.gnu.org Git - gcc.git/blame - gcc/doc/hostconfig.texi
* config/i386/i386.h (MODES_TIEABLE_P): Fix typo.
[gcc.git] / gcc / doc / hostconfig.texi
CommitLineData
476d9098
GK
1@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2@c 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
73a8ed7e 3@c This is part of the GCC manual.
476d9098 4@c For copying conditions, see the file gccint.texi.
73a8ed7e 5
807633e5 6@node Host Config
476d9098
GK
7@chapter Host Configuration
8@cindex host configuration
9
10Most details about the machine and system on which the compiler is
11actually running are detected by the @command{configure} script. Some
12things are impossible for @command{configure} to detect; these are
13described in two ways, either by macros defined in a file named
14@file{xm-@var{machine}.h} or by hook functions in the file specified
15by the @var{out_host_hook_obj} variable in @file{config.gcc}. (The
16intention is that very few hosts will need a header file but nearly
17every fully supported host will need to override some hooks.)
18
19If you need to define only a few macros, and they have simple
20definitions, consider using the @code{xm_defines} variable in your
21@file{config.gcc} entry instead of creating a host configuration
22header. @xref{System Config}.
23
24@menu
25* Host Common:: Things every host probably needs implemented.
26* Filesystem:: Your host can't have the letter `a' in filenames?
27* Host Misc:: Rare configuration options for hosts.
28@end menu
29
30@node Host Common
31@section Host Common
32@cindex host hooks
33@cindex host functions
34
35Some things are just not portable, even between similar operating systems,
36and are too difficult for autoconf to detect. They get implemented using
37hook functions in the file specified by the @var{host_hook_obj}
38variable in @file{config.gcc}.
39
40@deftypefn {Host Hook} void HOST_HOOKS_EXTRA_SIGNALS (void)
41This host hook is used to set up handling for extra signals. The most
42common thing to do in this hook is to detect stack overflow.
43@end deftypefn
44
45@node Filesystem
46@section Host Filesystem
73a8ed7e
JM
47@cindex configuration file
48@cindex @file{xm-@var{machine}.h}
49
476d9098
GK
50GCC supports some filesystems that are very different to standard Unix
51filesystems. These macros, defined in @file{xm-@var{machine}.h},
52let you choose.
73a8ed7e 53
807633e5 54@ftable @code
73a8ed7e
JM
55@item VMS
56Define this macro if the host system is VMS@.
57
807633e5
ZW
58@item HAVE_DOS_BASED_FILE_SYSTEM
59Define this macro if the host file system obeys the semantics defined by
60MS-DOS instead of Unix. DOS file systems are case insensitive, file
61specifications may begin with a drive letter, and both forward slash and
62backslash (@samp{/} and @samp{\}) are directory separators. If you
63define this macro, you probably need to define the next three macros too.
64
73a8ed7e 65@item PATH_SEPARATOR
807633e5
ZW
66If defined, this macro should expand to a character constant specifying
67the separator for elements of search paths. The default value is a
68colon (@samp{:}). DOS-based systems usually use semicolon (@samp{;}).
73a8ed7e 69
73a8ed7e 70@item DIR_SEPARATOR
807633e5
ZW
71@itemx DIR_SEPARATOR_2
72If defined, these macros expand to character constants specifying
73separators for directory names within a file specification. They are
74used somewhat inconsistently throughout the compiler. If your system
75behaves like Unix (only forward slash separates pathnames), define
76neither of them. If your system behaves like DOS (both forward and
77backward slash can be used), define @code{DIR_SEPARATOR} to @samp{/}
78and @code{DIR_SEPARATOR_2} to @samp{\}.
73a8ed7e 79
73a8ed7e
JM
80@item HOST_OBJECT_SUFFIX
81Define this macro to be a C string representing the suffix for object
807633e5
ZW
82files on your host machine. If you do not define this macro, GCC will
83use @samp{.o} as the suffix for object files.
73a8ed7e 84
73a8ed7e
JM
85@item HOST_EXECUTABLE_SUFFIX
86Define this macro to be a C string representing the suffix for
807633e5
ZW
87executable files on your host machine. If you do not define this macro,
88GCC will use the null string as the suffix for executable files.
73a8ed7e 89
73a8ed7e 90@item HOST_BIT_BUCKET
807633e5
ZW
91A pathname defined by the host operating system, which can be opened as
92a file and written to, but all the information written is discarded.
93This is commonly known as a @dfn{bit bucket} or @dfn{null device}. If
94you do not define this macro, GCC will use @samp{/dev/null} as the bit
95bucket. If the host does not support a bit bucket, define this macro to
96an invalid filename.
97
73a8ed7e
JM
98@item UPDATE_PATH_HOST_CANONICALIZE (@var{path})
99If defined, a C statement (sans semicolon) that performs host-dependent
100canonicalization when a path used in a compilation driver or
101preprocessor is canonicalized. @var{path} is a malloc-ed path to be
102canonicalized. If the C statement does canonicalize @var{path} into a
103different buffer, the old path should be freed and the new buffer should
104have been allocated with malloc.
73a8ed7e 105
6baf9874 106@item DUMPFILE_FORMAT
807633e5
ZW
107Define this macro to be a C string representing the format to use for
108constructing the index part of debugging dump file names. The resultant
109string must fit in fifteen bytes. The full filename will be the
110concatenation of: the prefix of the assembler file name, the string
111resulting from applying this format to an index number, and a string
6baf9874 112unique to each dump file kind, e.g. @samp{rtl}.
807633e5
ZW
113
114If you do not define this macro, GCC will use @samp{.%02d.}. You should
115define this macro if using the default will create an invalid file name.
476d9098
GK
116@end ftable
117
118@node Host Misc
119@section Host Misc
120@cindex configuration file
121@cindex @file{xm-@var{machine}.h}
122
123@ftable @code
124@item FATAL_EXIT_CODE
125A C expression for the status code to be returned when the compiler
126exits after serious errors. The default is the system-provided macro
127@samp{EXIT_FAILURE}, or @samp{1} if the system doesn't define that
128macro. Define this macro only if these defaults are incorrect.
129
130@item SUCCESS_EXIT_CODE
131A C expression for the status code to be returned when the compiler
132exits without serious errors. (Warnings are not serious errors.) The
133default is the system-provided macro @samp{EXIT_SUCCESS}, or @samp{0} if
134the system doesn't define that macro. Define this macro only if these
135defaults are incorrect.
136
137@item USE_C_ALLOCA
138Define this macro if GCC should use the C implementation of @code{alloca}
139provided by @file{libiberty.a}. This only affects how some parts of the
140compiler itself allocate memory. It does not change code generation.
141
142When GCC is built with a compiler other than itself, the C @code{alloca}
143is always used. This is because most other implementations have serious
144bugs. You should define this macro only on a system where no
145stack-based @code{alloca} can possibly work. For instance, if a system
146has a small limit on the size of the stack, GCC's builtin @code{alloca}
147will not work reliably.
148
149@item COLLECT2_HOST_INITIALIZATION
150If defined, a C statement (sans semicolon) that performs host-dependent
151initialization when @code{collect2} is being initialized.
152
153@item GCC_DRIVER_HOST_INITIALIZATION
154If defined, a C statement (sans semicolon) that performs host-dependent
155initialization when a compilation driver is being initialized.
807633e5
ZW
156
157@item SMALL_ARG_MAX
158Define this macro if the host system has a small limit on the total
159size of an argument vector. This causes the driver to take more care
160not to pass unnecessary arguments to subprocesses.
161@end ftable
162
163In addition, if @command{configure} generates an incorrect definition of
164any of the macros in @file{auto-host.h}, you can override that
165definition in a host configuration header. If you need to do this,
166first see if it is possible to fix @command{configure}.
This page took 0.406599 seconds and 5 git commands to generate.