Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

141 lines
6.6KB

  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>Host Common (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="Host Common (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="Host Common (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="Host-Config.html#Host-Config" rel="up" title="Host Config">
  30. <link href="Filesystem.html#Filesystem" rel="next" title="Filesystem">
  31. <link href="Host-Config.html#Host-Config" rel="prev" title="Host Config">
  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="Host-Common"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Filesystem.html#Filesystem" accesskey="n" rel="next">Filesystem</a>, Up: <a href="Host-Config.html#Host-Config" accesskey="u" rel="up">Host Config</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="Host-Common-1"></a>
  68. <h3 class="section">19.1 Host Common</h3>
  69. <a name="index-host-hooks"></a>
  70. <a name="index-host-functions"></a>
  71. <p>Some things are just not portable, even between similar operating systems,
  72. and are too difficult for autoconf to detect. They get implemented using
  73. hook functions in the file specified by the <var>host_hook_obj</var>
  74. variable in <samp>config.gcc</samp>.
  75. </p>
  76. <dl>
  77. <dt><a name="index-HOST_005fHOOKS_005fEXTRA_005fSIGNALS"></a>Host Hook: <em>void</em> <strong>HOST_HOOKS_EXTRA_SIGNALS</strong> <em>(void)</em></dt>
  78. <dd><p>This host hook is used to set up handling for extra signals. The most
  79. common thing to do in this hook is to detect stack overflow.
  80. </p></dd></dl>
  81. <dl>
  82. <dt><a name="index-HOST_005fHOOKS_005fGT_005fPCH_005fGET_005fADDRESS"></a>Host Hook: <em>void *</em> <strong>HOST_HOOKS_GT_PCH_GET_ADDRESS</strong> <em>(size_t <var>size</var>, int <var>fd</var>)</em></dt>
  83. <dd><p>This host hook returns the address of some space that is likely to be
  84. free in some subsequent invocation of the compiler. We intend to load
  85. the PCH data at this address such that the data need not be relocated.
  86. The area should be able to hold <var>size</var> bytes. If the host uses
  87. <code>mmap</code>, <var>fd</var> is an open file descriptor that can be used for
  88. probing.
  89. </p></dd></dl>
  90. <dl>
  91. <dt><a name="index-HOST_005fHOOKS_005fGT_005fPCH_005fUSE_005fADDRESS"></a>Host Hook: <em>int</em> <strong>HOST_HOOKS_GT_PCH_USE_ADDRESS</strong> <em>(void * <var>address</var>, size_t <var>size</var>, int <var>fd</var>, size_t <var>offset</var>)</em></dt>
  92. <dd><p>This host hook is called when a PCH file is about to be loaded.
  93. We want to load <var>size</var> bytes from <var>fd</var> at <var>offset</var>
  94. into memory at <var>address</var>. The given address will be the result of
  95. a previous invocation of <code>HOST_HOOKS_GT_PCH_GET_ADDRESS</code>.
  96. Return -1 if we couldn&rsquo;t allocate <var>size</var> bytes at <var>address</var>.
  97. Return 0 if the memory is allocated but the data is not loaded. Return 1
  98. if the hook has performed everything.
  99. </p>
  100. <p>If the implementation uses reserved address space, free any reserved
  101. space beyond <var>size</var>, regardless of the return value. If no PCH will
  102. be loaded, this hook may be called with <var>size</var> zero, in which case
  103. all reserved address space should be freed.
  104. </p>
  105. <p>Do not try to handle values of <var>address</var> that could not have been
  106. returned by this executable; just return -1. Such values usually
  107. indicate an out-of-date PCH file (built by some other GCC executable),
  108. and such a PCH file won&rsquo;t work.
  109. </p></dd></dl>
  110. <dl>
  111. <dt><a name="index-HOST_005fHOOKS_005fGT_005fPCH_005fALLOC_005fGRANULARITY"></a>Host Hook: <em>size_t</em> <strong>HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY</strong> <em>(void);</em></dt>
  112. <dd><p>This host hook returns the alignment required for allocating virtual
  113. memory. Usually this is the same as getpagesize, but on some hosts the
  114. alignment for reserving memory differs from the pagesize for committing
  115. memory.
  116. </p></dd></dl>
  117. <hr>
  118. <div class="header">
  119. <p>
  120. Next: <a href="Filesystem.html#Filesystem" accesskey="n" rel="next">Filesystem</a>, Up: <a href="Host-Config.html#Host-Config" accesskey="u" rel="up">Host Config</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>
  121. </div>
  122. </body>
  123. </html>