Front-End.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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: Front End</title>
  20. <meta name="description" content="GNU Compiler Collection (GCC) Internals: Front End">
  21. <meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Front End">
  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="gcc-Directory.html#gcc-Directory" rel="up" title="gcc Directory">
  30. <link href="Front-End-Directory.html#Front-End-Directory" rel="next" title="Front End Directory">
  31. <link href="Miscellaneous-Docs.html#Miscellaneous-Docs" rel="prev" title="Miscellaneous Docs">
  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="Front-End"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Back-End.html#Back-End" accesskey="n" rel="next">Back End</a>, Previous: <a href="Documentation.html#Documentation" accesskey="p" rel="prev">Documentation</a>, Up: <a href="gcc-Directory.html#gcc-Directory" accesskey="u" rel="up">gcc Directory</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="Anatomy-of-a-Language-Front-End"></a>
  69. <h4 class="subsection">6.3.8 Anatomy of a Language Front End</h4>
  70. <p>A front end for a language in GCC has the following parts:
  71. </p>
  72. <ul>
  73. <li> A directory <samp><var>language</var></samp> under <samp>gcc</samp> containing source
  74. files for that front end. See <a href="Front-End-Directory.html#Front-End-Directory">The Front End
  75. <samp><var>language</var></samp> Directory</a>, for details.
  76. </li><li> A mention of the language in the list of supported languages in
  77. <samp>gcc/doc/install.texi</samp>.
  78. </li><li> A mention of the name under which the language&rsquo;s runtime library is
  79. recognized by <samp>--enable-shared=<var>package</var></samp> in the
  80. documentation of that option in <samp>gcc/doc/install.texi</samp>.
  81. </li><li> A mention of any special prerequisites for building the front end in
  82. the documentation of prerequisites in <samp>gcc/doc/install.texi</samp>.
  83. </li><li> Details of contributors to that front end in
  84. <samp>gcc/doc/contrib.texi</samp>. If the details are in that front end&rsquo;s
  85. own manual then there should be a link to that manual&rsquo;s list in
  86. <samp>contrib.texi</samp>.
  87. </li><li> Information about support for that language in
  88. <samp>gcc/doc/frontends.texi</samp>.
  89. </li><li> Information about standards for that language, and the front end&rsquo;s
  90. support for them, in <samp>gcc/doc/standards.texi</samp>. This may be a
  91. link to such information in the front end&rsquo;s own manual.
  92. </li><li> Details of source file suffixes for that language and <samp>-x
  93. <var>lang</var></samp> options supported, in <samp>gcc/doc/invoke.texi</samp>.
  94. </li><li> Entries in <code>default_compilers</code> in <samp>gcc.c</samp> for source file
  95. suffixes for that language.
  96. </li><li> Preferably testsuites, which may be under <samp>gcc/testsuite</samp> or
  97. runtime library directories. FIXME: document somewhere how to write
  98. testsuite harnesses.
  99. </li><li> Probably a runtime library for the language, outside the <samp>gcc</samp>
  100. directory. FIXME: document this further.
  101. </li><li> Details of the directories of any runtime libraries in
  102. <samp>gcc/doc/sourcebuild.texi</samp>.
  103. </li><li> Check targets in <samp>Makefile.def</samp> for the top-level <samp>Makefile</samp>
  104. to check just the compiler or the compiler and runtime library for the
  105. language.
  106. </li></ul>
  107. <p>If the front end is added to the official GCC source repository, the
  108. following are also necessary:
  109. </p>
  110. <ul>
  111. <li> At least one Bugzilla component for bugs in that front end and runtime
  112. libraries. This category needs to be added to the Bugzilla database.
  113. </li><li> Normally, one or more maintainers of that front end listed in
  114. <samp>MAINTAINERS</samp>.
  115. </li><li> Mentions on the GCC web site in <samp>index.html</samp> and
  116. <samp>frontends.html</samp>, with any relevant links on
  117. <samp>readings.html</samp>. (Front ends that are not an official part of
  118. GCC may also be listed on <samp>frontends.html</samp>, with relevant links.)
  119. </li><li> A news item on <samp>index.html</samp>, and possibly an announcement on the
  120. <a href="mailto:gcc-announce@gcc.gnu.org">gcc-announce@gcc.gnu.org</a> mailing list.
  121. </li><li> The front end&rsquo;s manuals should be mentioned in
  122. <samp>maintainer-scripts/update_web_docs_svn</samp> (see <a href="Texinfo-Manuals.html#Texinfo-Manuals">Texinfo Manuals</a>)
  123. and the online manuals should be linked to from
  124. <samp>onlinedocs/index.html</samp>.
  125. </li><li> Any old releases or CVS repositories of the front end, before its
  126. inclusion in GCC, should be made available on the GCC FTP site
  127. <a href="ftp://gcc.gnu.org/pub/gcc/old-releases/">ftp://gcc.gnu.org/pub/gcc/old-releases/</a>.
  128. </li><li> The release and snapshot script <samp>maintainer-scripts/gcc_release</samp>
  129. should be updated to generate appropriate tarballs for this front end.
  130. </li><li> If this front end includes its own version files that include the
  131. current date, <samp>maintainer-scripts/update_version</samp> should be
  132. updated accordingly.
  133. </li></ul>
  134. <table class="menu" border="0" cellspacing="0">
  135. <tr><td align="left" valign="top">&bull; <a href="Front-End-Directory.html#Front-End-Directory" accesskey="1">Front End Directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The front end <samp><var>language</var></samp> directory.
  136. </td></tr>
  137. <tr><td align="left" valign="top">&bull; <a href="Front-End-Config.html#Front-End-Config" accesskey="2">Front End Config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The front end <samp>config-lang.in</samp> file.
  138. </td></tr>
  139. <tr><td align="left" valign="top">&bull; <a href="Front-End-Makefile.html#Front-End-Makefile" accesskey="3">Front End Makefile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The front end <samp>Make-lang.in</samp> file.
  140. </td></tr>
  141. </table>
  142. <hr>
  143. <div class="header">
  144. <p>
  145. Next: <a href="Back-End.html#Back-End" accesskey="n" rel="next">Back End</a>, Previous: <a href="Documentation.html#Documentation" accesskey="p" rel="prev">Documentation</a>, Up: <a href="gcc-Directory.html#gcc-Directory" accesskey="u" rel="up">gcc Directory</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>
  146. </div>
  147. </body>
  148. </html>