]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gcc/known-causes-of-trouble-with-gcc/fixed-header-files.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / known-causes-of-trouble-with-gcc / fixed-header-files.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _fixed-headers:
7
8 Fixed Header Files
9 ******************
10
11 GCC needs to install corrected versions of some system header files.
12 This is because most target systems have some header files that won't
13 work with GCC unless they are changed. Some have bugs, some are
14 incompatible with ISO C, and some depend on special features of other
15 compilers.
16
17 Installing GCC automatically creates and installs the fixed header
18 files, by running a program called ``fixincludes``. Normally, you
19 don't need to pay attention to this. But there are cases where it
20 doesn't do the right thing automatically.
21
22 * If you update the system's header files, such as by installing a new
23 system version, the fixed header files of GCC are not automatically
24 updated. They can be updated using the :command:`mkheaders` script
25 installed in
26 :samp:`{libexecdir}/gcc/{target}/{version}/install-tools/`.
27
28 * On some systems, header file directories contain
29 machine-specific symbolic links in certain places. This makes it
30 possible to share most of the header files among hosts running the
31 same version of the system on different machine models.
32
33 The programs that fix the header files do not understand this special
34 way of using symbolic links; therefore, the directory of fixed header
35 files is good only for the machine model used to build it.
36
37 It is possible to make separate sets of fixed header files for the
38 different machine models, and arrange a structure of symbolic links so
39 as to use the proper set, but you'll have to do this by hand.