From 8668ac081a8596af97fbeed1bd3ae74d5e93e7d1 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor
The master sources for the gccgo frontend may be found at
-http://code.google.com/p/gofrontend.
+http://go.googlesource.com/gofrontend.
+They are mirrored
+at http://github.com/golang/gofrontend.
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
@@ -53,14 +55,12 @@ them.
-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
diff --git a/doc/gccgo_install.html b/doc/gccgo_install.html
index acb315a0ac6..8f744a6216b 100644
--- a/doc/gccgo_install.html
+++ b/doc/gccgo_install.html
@@ -46,6 +46,12 @@ identical to Go 1.1. The GCC 4.8.2 release includes a complete Go
The GCC 4.9 releases include a complete Go 1.2 implementation.
+The GCC 5 releases include a complete implementation of the Go 1.4
+user libraries. The Go 1.4 runtime is not fully merged, but that
+should not be visible to Go programs.
+
@@ -174,13 +180,10 @@ export LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH
-The gccgo compiler works like other gcc frontends. The gccgo
-installation does not currently include a version of
-the
@@ -232,13 +235,14 @@ name the directory where
-Passing a gcc/go/gofrontend
to gcc/go
.
+The gccgo frontend is written in C++.
+It follows the GNU and GCC coding standards for C++.
+In writing code for the frontend, follow the formatting of the
+surrounding code.
+Almost all GCC-specific code is not in the frontend proper and is
+instead in the GCC sources in the gcc/go
directory.
Source code
Using gccgo
go
command. However if you have the go
-command from an installation of the gc
compiler, you can
-use it with gccgo by passing the option -compiler gccgo
-to go build
or go install
or go
-test
.
+The gccgo compiler works like other gcc frontends. As of GCC 5 the gccgo
+installation also includes a version of the go
command,
+which may be used to build Go programs as described at
+http://golang.org/cmd/go.
libgo.so
is found.
-Wl,-R
option when you link:
+Passing a -Wl,-R
option when you link (replace lib with
+lib64 if appropriate for your system):
-gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
+go build -gccgoflags -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
[or]
-gccgo -o file file.o -Wl,-R,${prefix}/lib64/gcc/MACHINE/VERSION
+gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
-g
options.
-The -fgo-prefix=PREFIX
option may be used to set a unique
-prefix for the package being compiled. This option is intended for
-use with large programs that contain many packages, in order to allow
-multiple packages to use the same identifier as the package name.
-The PREFIX
may be any string; a good choice for the
-string is the directory where the package will be installed.
+The -fgo-pkgpath=PKGPATH
option may be used to set a
+unique prefix for the package being compiled.
+This option is automatically used by the go command, but you may want
+to use it if you invoke gccgo directly.
+This option is intended for use with large
+programs that contain many packages, in order to allow multiple
+packages to use the same identifier as the package name.
+The PKGPATH
may be any string; a good choice for the
+string is the path used to import the package.
The -I
and -L
options, which are synonyms
for the compiler, may be used to set the search path for finding
imports.
+These options are not needed if you build with the go command.
When you compile a file that exports something, the export -information will be stored directly in the object file. When -you import a package, you must tell gccgo how to -find the file. +information will be stored directly in the object file. +If you build with gccgo directly, rather than with the go command, +then when you import a package, you must tell gccgo how to find the +file. +
When you import the package FILE with gccgo, @@ -319,9 +329,10 @@ gccgo. Both options take directories to search. The
-The gccgo compiler does not currently (2013-06-20) record +The gccgo compiler does not currently (2015-06-15) record the file name of imported packages in the object file. You must arrange for the imported data to be linked into the program. +Again, this is not necessary when building with the go command.