summaryrefslogtreecommitdiff
path: root/doc/gccgo_contribute.html
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-09-13 13:13:40 +0200
committerOndřej Surý <ondrej@sury.org>2011-09-13 13:13:40 +0200
commit5ff4c17907d5b19510a62e08fd8d3b11e62b431d (patch)
treec0650497e988f47be9c6f2324fa692a52dea82e1 /doc/gccgo_contribute.html
parent80f18fc933cf3f3e829c5455a1023d69f7b86e52 (diff)
downloadgolang-upstream/60.tar.gz
Imported Upstream version 60upstream/60
Diffstat (limited to 'doc/gccgo_contribute.html')
-rw-r--r--doc/gccgo_contribute.html99
1 files changed, 99 insertions, 0 deletions
diff --git a/doc/gccgo_contribute.html b/doc/gccgo_contribute.html
new file mode 100644
index 000000000..8eeb3a5c5
--- /dev/null
+++ b/doc/gccgo_contribute.html
@@ -0,0 +1,99 @@
+<!-- Contributing to the gccgo frontend -->
+
+<h2>Introduction</h2>
+
+<p>
+These are some notes on contributing to the <code>gccgo</code>
+frontend for GCC. For information on contributing to parts of Go other
+than <code>gccgo</code>, see <a href="contribute.html">Contributing to
+the Go project</a>. For information on building <code>gccgo</code>
+for yourself, see <a href="gccgo_install.html">Setting up and using
+gccgo</a>.
+</p>
+
+<h2>Legal Prerequisites</h2>
+
+<p>
+You must follow the <a href="contribute.html#copyright">Go copyright
+rules.</a>
+</p>
+
+<h2>Code</h2>
+
+<p>
+The source code for the <code>gccgo</code> frontend may be found at
+<a href="http://code.google.com/p/gofrontend">http://code.google.com/p/gofrontend</a>.
+Changes made to that project are routinely merged into the source code
+hosted at <code>gcc.gnu.org</code>. The <code>gofrontend</code>
+project includes only the Go frontend proper. These are the files
+which in the <code>gcc</code> sources may be found in the
+directories <code>gcc/go</code> and <code>libgo</code>.
+The <code>gcc</code> sources also include a copy of
+the <code>test</code> directory
+from <a href="http://code.google.com/p/go">the main Go repository</a>.
+
+<p>
+The frontend is written in C++ and as such the GNU coding standards do
+not entirely apply; in writing code for the frontend, follow the
+formatting of the surrounding code. Although the frontend is
+currently closely tied to the rest of the <code>gcc</code> codebase,
+we plan to make it more independent. Any new code that uses other
+parts of <code>gcc</code> should be placed in an appropriate file,
+such as <code>gogo-tree.cc</code>. Eventually
+all <code>gcc</code>-specific code should migrate to
+a <code>gcc-interface</code> subdirectory.
+</p>
+
+<p>
+The run-time library for <code>gccgo</code> is mostly the same as the
+library in <a href="http://code.google.com/p/go">the main Go
+repository</a>. The library code in the Go repository is periodically
+copied into the <code>gofrontend</code> and the <code>gcc</code>
+repositories. Accordingly, most library changes should be made in the
+main Go repository. Changes to the few <code>gccgo</code>-specific
+parts of the library should follow the process described here.
+The <code>gccgo</code>-specific parts of the library are everything in
+the <code>libgo</code> directory except for the <code>libgo/go</code>
+subdirectory.
+</p>
+
+<h2>Testing</h2>
+
+<p>
+All patches must be tested. There are two test suites. A patch that
+introduces new failures is not acceptable.
+</p>
+
+<p>
+To run the compiler test suite, run <code>make check-go</code> in the
+<code>gcc</code> subdirectory of your build directory. This will run
+various tests underneath <code>gcc/testsuite/go.*</code>. This
+includes a copy of the tests in the main Go repository, which are run
+using the DejaGNU script found in
+in <code>gcc/testsuite/go.test/go-test.exp</code>. Many of the
+compiler tests may be run without the Go library, but some do require
+the library to built first.
+</p>
+
+<p>
+To run the library test suite, run <code>make
+check-target-libgo</code> in the top level of your build directory.
+</p>
+
+<p>
+Most new tests should be submitted to the main Go repository for
+copying into the <code>gccgo</code> repository. If there is a need
+for specific tests for <code>gccgo</code>, they should go in
+the <code>gcc/testsuite/go.go-torture</code>
+or <code>gcc/testsuite/go.dg</code> directories in
+the <code>gcc.gnu.org</code> repository.
+</p>
+
+<h2>Submitting Changes</h2>
+
+<p>
+Changes to the Go frontend should follow the same process as for the
+main Go repository, only for the <code>gofrontend</code> project
+rather than the <code>go</code> project. Those changes will then be
+merged into the <code>gcc</code> sources.
+</p>