From 253c139275d4997f466157dcfd0699bd6227751e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 18 Feb 2012 11:15:52 -0800 Subject: [PATCH] doc: update gccgo_contribute.html R=golang-dev, r CC=golang-dev https://golang.org/cl/5673080 --- doc/gccgo_contribute.html | 115 ++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 55 deletions(-) diff --git a/doc/gccgo_contribute.html b/doc/gccgo_contribute.html index b641c1abb5..e3f6bf470a 100644 --- a/doc/gccgo_contribute.html +++ b/doc/gccgo_contribute.html @@ -5,90 +5,95 @@

Introduction

-These are some notes on contributing to the gccgo -frontend for GCC. For information on contributing to parts of Go other -than gccgo, see Contributing to -the Go project. For information on building gccgo -for yourself, see Setting up and using -gccgo. +These are some notes on contributing to the gccgo frontend for GCC. +For information on contributing to parts of Go other than gccgo, +see Contributing to the Go project. For +information on building gccgo for yourself, +see Setting up and using gccgo.

Legal Prerequisites

You must follow the Go copyright -rules. +rules for all changes to the gccgo frontend and the associated +libgo library. Code that is part of GCC rather than gccgo must follow +the general GCC +contribution rules.

Code

-The source code for the gccgo frontend may be found at +The master sources for the gccgo frontend may be found at http://code.google.com/p/gofrontend. -Changes made to that project are routinely merged into the source code -hosted at gcc.gnu.org. The gofrontend -project includes only the Go frontend proper. These are the files -which in the gcc sources may be found in the -directories gcc/go and libgo. -The gcc sources also include a copy of -the test directory -from the main Go repository. +The master sources are not buildable by themselves, but only in +conjunction with GCC (in the future, other compilers may be +supported). Changes made to the gccgo frontend are also applied to +the GCC source code repository hosted at gcc.gnu.org. In +the gofrontend repository, the go directory +is mirrored to the gcc/go/gofrontend directory in the GCC +repository, and the gofrontend libgo +directory is mirrored to the GCC libgo directory. In +addition, the test directory +from the main Go repository +is mirrored to the gcc/testsuite/go.test/test directory +in the GCC repository. +

-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 gcc codebase, -we plan to make it more independent. Any new code that uses other -parts of gcc should be placed in an appropriate file, -such as gogo-tree.cc. Eventually -all gcc-specific code should migrate to -a gcc-interface subdirectory. +Changes to these directories always flow from the master sources to +the GCC repository. The files should never be changed in the GCC +repository except by changing them in the master sources and mirroring +them.

-The run-time library for gccgo is mostly the same as the -library in the main Go -repository. The library code in the Go repository is periodically -copied into the gofrontend and the gcc -repositories. Accordingly, most library changes should be made in the -main Go repository. Changes to the few gccgo-specific -parts of the library should follow the process described here. -The gccgo-specific parts of the library are everything in -the libgo directory except for the libgo/go -subdirectory. +The gccgo frontend is written in C++. It follows the GNU coding +standards to the extent that they apply to C++. In writing code for +the frontend, follow the formatting of the surrounding code. Although +the frontend is currently tied to the rest of the GCC codebase, we +plan to make it more independent. Eventually all GCC-specific code +will migrate out of the frontend proper and into GCC proper. In the +GCC sources this will generally mean moving code +from gcc/go/gofrontend to gcc/go.

-

Testing

-

-All patches must be tested. There are two test suites. A patch that -introduces new failures is not acceptable. +The run-time library for gccgo is mostly the same as the library +in the main Go repository. +The library code in the Go repository is periodically merged into +the libgo/go directory of the gofrontend and +then the GCC repositories, using the shell +script libgo/merge.sh. Accordingly, most library changes +should be made in the main Go repository. The files outside +of libgo/go are gccgo-specific; that said, some of the +files in libgo/runtime are based on files +in src/pkg/runtime in the main Go repository.

+

Testing

+

-To run the compiler test suite, run make check-go in the -gcc subdirectory of your build directory. This will run -various tests underneath gcc/testsuite/go.*. This -includes a copy of the tests in the main Go repository, which are run -using the DejaGNU script found in -in gcc/testsuite/go.test/go-test.exp. Many of the -compiler tests may be run without the Go library, but some do require -the library to built first. +All patches must be tested. A patch that introduces new failures is +not acceptable.

-To run the library test suite, run make -check-target-libgo in the top level of your build directory. +To run the gccgo test suite, run make check-go in your +build directory. This will run various tests +under gcc/testsuite/go.* and will also run +the libgo testsuite. This copy of the tests from the +main Go repository is run using the DejaGNU script found in +in gcc/testsuite/go.test/go-test.exp.

-Most new tests should be submitted to the main Go repository for -copying into the gccgo repository. If there is a need -for specific tests for gccgo, they should go in +Most new tests should be submitted to the main Go repository for later +mirroring into the GCC repository. If there is a need for specific +tests for gccgo, they should go in the gcc/testsuite/go.go-torture -or gcc/testsuite/go.dg directories in -the gcc.gnu.org repository. +or gcc/testsuite/go.dg directories in the GCC repository.

Submitting Changes

@@ -97,5 +102,5 @@ the gcc.gnu.org repository. Changes to the Go frontend should follow the same process as for the main Go repository, only for the gofrontend project rather than the go project. Those changes will then be -merged into the gcc sources. +merged into the GCC sources.

-- 2.50.0