You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
6.3KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>PCH Target (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="PCH Target (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="PCH Target (GNU Compiler Collection (GCC) Internals)">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Target-Macros.html#Target-Macros" rel="up" title="Target Macros">
  30. <link href="C_002b_002b-ABI.html#C_002b_002b-ABI" rel="next" title="C++ ABI">
  31. <link href="MIPS-Coprocessors.html#MIPS-Coprocessors" rel="prev" title="MIPS Coprocessors">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="PCH-Target"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="C_002b_002b-ABI.html#C_002b_002b-ABI" accesskey="n" rel="next">C++ ABI</a>, Previous: <a href="MIPS-Coprocessors.html#MIPS-Coprocessors" accesskey="p" rel="prev">MIPS Coprocessors</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="Parameters-for-Precompiled-Header-Validity-Checking"></a>
  68. <h3 class="section">18.27 Parameters for Precompiled Header Validity Checking</h3>
  69. <a name="index-parameters_002c-precompiled-headers"></a>
  70. <dl>
  71. <dt><a name="index-TARGET_005fGET_005fPCH_005fVALIDITY"></a>Target Hook: <em>void *</em> <strong>TARGET_GET_PCH_VALIDITY</strong> <em>(size_t *<var>sz</var>)</em></dt>
  72. <dd><p>This hook returns a pointer to the data needed by
  73. <code>TARGET_PCH_VALID_P</code> and sets
  74. &lsquo;<samp>*<var>sz</var></samp>&rsquo; to the size of the data in bytes.
  75. </p></dd></dl>
  76. <dl>
  77. <dt><a name="index-TARGET_005fPCH_005fVALID_005fP"></a>Target Hook: <em>const char *</em> <strong>TARGET_PCH_VALID_P</strong> <em>(const void *<var>data</var>, size_t <var>sz</var>)</em></dt>
  78. <dd><p>This hook checks whether the options used to create a PCH file are
  79. compatible with the current settings. It returns <code>NULL</code>
  80. if so and a suitable error message if not. Error messages will
  81. be presented to the user and must be localized using &lsquo;<samp>_(<var>msg</var>)</samp>&rsquo;.
  82. </p>
  83. <p><var>data</var> is the data that was returned by <code>TARGET_GET_PCH_VALIDITY</code>
  84. when the PCH file was created and <var>sz</var> is the size of that data in bytes.
  85. It&rsquo;s safe to assume that the data was created by the same version of the
  86. compiler, so no format checking is needed.
  87. </p>
  88. <p>The default definition of <code>default_pch_valid_p</code> should be
  89. suitable for most targets.
  90. </p></dd></dl>
  91. <dl>
  92. <dt><a name="index-TARGET_005fCHECK_005fPCH_005fTARGET_005fFLAGS"></a>Target Hook: <em>const char *</em> <strong>TARGET_CHECK_PCH_TARGET_FLAGS</strong> <em>(int <var>pch_flags</var>)</em></dt>
  93. <dd><p>If this hook is nonnull, the default implementation of
  94. <code>TARGET_PCH_VALID_P</code> will use it to check for compatible values
  95. of <code>target_flags</code>. <var>pch_flags</var> specifies the value that
  96. <code>target_flags</code> had when the PCH file was created. The return
  97. value is the same as for <code>TARGET_PCH_VALID_P</code>.
  98. </p></dd></dl>
  99. <dl>
  100. <dt><a name="index-TARGET_005fPREPARE_005fPCH_005fSAVE"></a>Target Hook: <em>void</em> <strong>TARGET_PREPARE_PCH_SAVE</strong> <em>(void)</em></dt>
  101. <dd><p>Called before writing out a PCH file. If the target has some
  102. garbage-collected data that needs to be in a particular state on PCH loads,
  103. it can use this hook to enforce that state. Very few targets need
  104. to do anything here.
  105. </p></dd></dl>
  106. <hr>
  107. <div class="header">
  108. <p>
  109. Next: <a href="C_002b_002b-ABI.html#C_002b_002b-ABI" accesskey="n" rel="next">C++ ABI</a>, Previous: <a href="MIPS-Coprocessors.html#MIPS-Coprocessors" accesskey="p" rel="prev">MIPS Coprocessors</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  110. </div>
  111. </body>
  112. </html>