Filesystem.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>GNU Compiler Collection (GCC) Internals: Filesystem</title>
  20. <meta name="description" content="GNU Compiler Collection (GCC) Internals: Filesystem">
  21. <meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Filesystem">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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="Host-Misc.html#Host-Misc" rel="next" title="Host Misc">
  31. <link href="Host-Common.html#Host-Common" rel="prev" title="Host Common">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Filesystem"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Host-Misc.html#Host-Misc" accesskey="n" rel="next">Host Misc</a>, Previous: <a href="Host-Common.html#Host-Common" accesskey="p" rel="prev">Host Common</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>
  66. </div>
  67. <hr>
  68. <a name="Host-Filesystem"></a>
  69. <h3 class="section">18.2 Host Filesystem</h3>
  70. <a name="index-configuration-file"></a>
  71. <a name="index-xm_002dmachine_002eh"></a>
  72. <p>GCC needs to know a number of things about the semantics of the host
  73. machine&rsquo;s filesystem. Filesystems with Unix and MS-DOS semantics are
  74. automatically detected. For other systems, you can define the
  75. following macros in <samp>xm-<var>machine</var>.h</samp>.
  76. </p>
  77. <dl compact="compact">
  78. <dt><code>HAVE_DOS_BASED_FILE_SYSTEM</code>
  79. <a name="index-HAVE_005fDOS_005fBASED_005fFILE_005fSYSTEM"></a>
  80. </dt>
  81. <dd><p>This macro is automatically defined by <samp>system.h</samp> if the host
  82. file system obeys the semantics defined by MS-DOS instead of Unix.
  83. DOS file systems are case insensitive, file specifications may begin
  84. with a drive letter, and both forward slash and backslash (&lsquo;<samp>/</samp>&rsquo;
  85. and &lsquo;<samp>\</samp>&rsquo;) are directory separators.
  86. </p>
  87. </dd>
  88. <dt><code>DIR_SEPARATOR</code>
  89. <a name="index-DIR_005fSEPARATOR"></a>
  90. </dt>
  91. <dt><code>DIR_SEPARATOR_2</code>
  92. <a name="index-DIR_005fSEPARATOR_005f2"></a>
  93. </dt>
  94. <dd><p>If defined, these macros expand to character constants specifying
  95. separators for directory names within a file specification.
  96. <samp>system.h</samp> will automatically give them appropriate values on
  97. Unix and MS-DOS file systems. If your file system is neither of
  98. these, define one or both appropriately in <samp>xm-<var>machine</var>.h</samp>.
  99. </p>
  100. <p>However, operating systems like VMS, where constructing a pathname is
  101. more complicated than just stringing together directory names
  102. separated by a special character, should not define either of these
  103. macros.
  104. </p>
  105. </dd>
  106. <dt><code>PATH_SEPARATOR</code>
  107. <a name="index-PATH_005fSEPARATOR"></a>
  108. </dt>
  109. <dd><p>If defined, this macro should expand to a character constant
  110. specifying the separator for elements of search paths. The default
  111. value is a colon (&lsquo;<samp>:</samp>&rsquo;). DOS-based systems usually, but not
  112. always, use semicolon (&lsquo;<samp>;</samp>&rsquo;).
  113. </p>
  114. </dd>
  115. <dt><code>VMS</code>
  116. <a name="index-VMS"></a>
  117. </dt>
  118. <dd><p>Define this macro if the host system is VMS.
  119. </p>
  120. </dd>
  121. <dt><code>HOST_OBJECT_SUFFIX</code>
  122. <a name="index-HOST_005fOBJECT_005fSUFFIX"></a>
  123. </dt>
  124. <dd><p>Define this macro to be a C string representing the suffix for object
  125. files on your host machine. If you do not define this macro, GCC will
  126. use &lsquo;<samp>.o</samp>&rsquo; as the suffix for object files.
  127. </p>
  128. </dd>
  129. <dt><code>HOST_EXECUTABLE_SUFFIX</code>
  130. <a name="index-HOST_005fEXECUTABLE_005fSUFFIX"></a>
  131. </dt>
  132. <dd><p>Define this macro to be a C string representing the suffix for
  133. executable files on your host machine. If you do not define this macro,
  134. GCC will use the null string as the suffix for executable files.
  135. </p>
  136. </dd>
  137. <dt><code>HOST_BIT_BUCKET</code>
  138. <a name="index-HOST_005fBIT_005fBUCKET"></a>
  139. </dt>
  140. <dd><p>A pathname defined by the host operating system, which can be opened as
  141. a file and written to, but all the information written is discarded.
  142. This is commonly known as a <em>bit bucket</em> or <em>null device</em>. If
  143. you do not define this macro, GCC will use &lsquo;<samp>/dev/null</samp>&rsquo; as the bit
  144. bucket. If the host does not support a bit bucket, define this macro to
  145. an invalid filename.
  146. </p>
  147. </dd>
  148. <dt><code>UPDATE_PATH_HOST_CANONICALIZE (<var>path</var>)</code>
  149. <a name="index-UPDATE_005fPATH_005fHOST_005fCANONICALIZE-_0028path_0029"></a>
  150. </dt>
  151. <dd><p>If defined, a C statement (sans semicolon) that performs host-dependent
  152. canonicalization when a path used in a compilation driver or
  153. preprocessor is canonicalized. <var>path</var> is a malloc-ed path to be
  154. canonicalized. If the C statement does canonicalize <var>path</var> into a
  155. different buffer, the old path should be freed and the new buffer should
  156. have been allocated with malloc.
  157. </p>
  158. </dd>
  159. <dt><code>DUMPFILE_FORMAT</code>
  160. <a name="index-DUMPFILE_005fFORMAT"></a>
  161. </dt>
  162. <dd><p>Define this macro to be a C string representing the format to use for
  163. constructing the index part of debugging dump file names. The resultant
  164. string must fit in fifteen bytes. The full filename will be the
  165. concatenation of: the prefix of the assembler file name, the string
  166. resulting from applying this format to an index number, and a string
  167. unique to each dump file kind, e.g. &lsquo;<samp>rtl</samp>&rsquo;.
  168. </p>
  169. <p>If you do not define this macro, GCC will use &lsquo;<samp>.%02d.</samp>&rsquo;. You should
  170. define this macro if using the default will create an invalid file name.
  171. </p>
  172. </dd>
  173. <dt><code>DELETE_IF_ORDINARY</code>
  174. <a name="index-DELETE_005fIF_005fORDINARY"></a>
  175. </dt>
  176. <dd><p>Define this macro to be a C statement (sans semicolon) that performs
  177. host-dependent removal of ordinary temp files in the compilation driver.
  178. </p>
  179. <p>If you do not define this macro, GCC will use the default version. You
  180. should define this macro if the default version does not reliably remove
  181. the temp file as, for example, on VMS which allows multiple versions
  182. of a file.
  183. </p>
  184. </dd>
  185. <dt><code>HOST_LACKS_INODE_NUMBERS</code>
  186. <a name="index-HOST_005fLACKS_005fINODE_005fNUMBERS"></a>
  187. </dt>
  188. <dd><p>Define this macro if the host filesystem does not report meaningful inode
  189. numbers in struct stat.
  190. </p></dd>
  191. </dl>
  192. <hr>
  193. <div class="header">
  194. <p>
  195. Next: <a href="Host-Misc.html#Host-Misc" accesskey="n" rel="next">Host Misc</a>, Previous: <a href="Host-Common.html#Host-Common" accesskey="p" rel="prev">Host Common</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>
  196. </div>
  197. </body>
  198. </html>