Skip to content

Commit 8668ac0

Browse files
doc: update gccgo docs for move of gofrontend to git
This also includes some other minor updates to the documentation. Change-Id: Iafab353727d7622d125b97fbdeaa81525b7a92aa Reviewed-on: https://go-review.googlesource.com/11123 Reviewed-by: Yves Junqueira <[email protected]> Reviewed-by: Russ Cox <[email protected]>
1 parent 18d9a8d commit 8668ac0

File tree

2 files changed

+40
-29
lines changed

2 files changed

+40
-29
lines changed

doc/gccgo_contribute.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ <h2>Code</h2>
3030

3131
<p>
3232
The master sources for the gccgo frontend may be found at
33-
<a href="//code.google.com/p/gofrontend">http://code.google.com/p/gofrontend</a>.
33+
<a href="http://go.googlesource.com/gofrontend">http://go.googlesource.com/gofrontend</a>.
34+
They are mirrored
35+
at <a href="http://github.com/golang/gofrontend">http://github.com/golang/gofrontend</a>.
3436
The master sources are not buildable by themselves, but only in
3537
conjunction with GCC (in the future, other compilers may be
3638
supported). Changes made to the gccgo frontend are also applied to
@@ -53,14 +55,12 @@ <h2>Code</h2>
5355
</p>
5456

5557
<p>
56-
The gccgo frontend is written in C++. It follows the GNU coding
57-
standards to the extent that they apply to C++. In writing code for
58-
the frontend, follow the formatting of the surrounding code. Although
59-
the frontend is currently tied to the rest of the GCC codebase, we
60-
plan to make it more independent. Eventually all GCC-specific code
61-
will migrate out of the frontend proper and into GCC proper. In the
62-
GCC sources this will generally mean moving code
63-
from <code>gcc/go/gofrontend</code> to <code>gcc/go</code>.
58+
The gccgo frontend is written in C++.
59+
It follows the GNU and GCC coding standards for C++.
60+
In writing code for the frontend, follow the formatting of the
61+
surrounding code.
62+
Almost all GCC-specific code is not in the frontend proper and is
63+
instead in the GCC sources in the <code>gcc/go</code> directory.
6464
</p>
6565

6666
<p>

doc/gccgo_install.html

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ <h2 id="Releases">Releases</h2>
4646
The GCC 4.9 releases include a complete Go 1.2 implementation.
4747
</p>
4848

49+
<p>
50+
The GCC 5 releases include a complete implementation of the Go 1.4
51+
user libraries. The Go 1.4 runtime is not fully merged, but that
52+
should not be visible to Go programs.
53+
</p>
54+
4955
<h2 id="Source_code">Source code</h2>
5056

5157
<p>
@@ -174,13 +180,10 @@ <h3 id="Ubuntu">A note on Ubuntu</h3>
174180
<h2 id="Using_gccgo">Using gccgo</h2>
175181

176182
<p>
177-
The gccgo compiler works like other gcc frontends. The gccgo
178-
installation does not currently include a version of
179-
the <code>go</code> command. However if you have the <code>go</code>
180-
command from an installation of the <code>gc</code> compiler, you can
181-
use it with gccgo by passing the option <code>-compiler gccgo</code>
182-
to <code>go build</code> or <code>go install</code> or <code>go
183-
test</code>.
183+
The gccgo compiler works like other gcc frontends. As of GCC 5 the gccgo
184+
installation also includes a version of the <code>go</code> command,
185+
which may be used to build Go programs as described at
186+
<a href="http://golang.org/cmd/go">http://golang.org/cmd/go</a>.
184187
</p>
185188

186189
<p>
@@ -232,13 +235,14 @@ <h2 id="Using_gccgo">Using gccgo</h2>
232235

233236
<li>
234237
<p>
235-
Passing a <code>-Wl,-R</code> option when you link:
238+
Passing a <code>-Wl,-R</code> option when you link (replace lib with
239+
lib64 if appropriate for your system):
236240
</p>
237241

238242
<pre>
239-
gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
243+
go build -gccgoflags -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
240244
[or]
241-
gccgo -o file file.o -Wl,-R,${prefix}/lib64/gcc/MACHINE/VERSION
245+
gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
242246
</pre>
243247
</li>
244248

@@ -266,27 +270,33 @@ <h2 id="Options">Options</h2>
266270
</p>
267271

268272
<p>
269-
The <code>-fgo-prefix=PREFIX</code> option may be used to set a unique
270-
prefix for the package being compiled. This option is intended for
271-
use with large programs that contain many packages, in order to allow
272-
multiple packages to use the same identifier as the package name.
273-
The <code>PREFIX</code> may be any string; a good choice for the
274-
string is the directory where the package will be installed.
273+
The <code>-fgo-pkgpath=PKGPATH</code> option may be used to set a
274+
unique prefix for the package being compiled.
275+
This option is automatically used by the go command, but you may want
276+
to use it if you invoke gccgo directly.
277+
This option is intended for use with large
278+
programs that contain many packages, in order to allow multiple
279+
packages to use the same identifier as the package name.
280+
The <code>PKGPATH</code> may be any string; a good choice for the
281+
string is the path used to import the package.
275282
</p>
276283

277284
<p>
278285
The <code>-I</code> and <code>-L</code> options, which are synonyms
279286
for the compiler, may be used to set the search path for finding
280287
imports.
288+
These options are not needed if you build with the go command.
281289
</p>
282290

283291
<h2 id="Imports">Imports</h2>
284292

285293
<p>
286294
When you compile a file that exports something, the export
287-
information will be stored directly in the object file. When
288-
you import a package, you must tell gccgo how to
289-
find the file.
295+
information will be stored directly in the object file.
296+
If you build with gccgo directly, rather than with the go command,
297+
then when you import a package, you must tell gccgo how to find the
298+
file.
299+
</p>
290300

291301
<p>
292302
When you import the package <var>FILE</var> with gccgo,
@@ -319,9 +329,10 @@ <h2 id="Imports">Imports</h2>
319329
</p>
320330

321331
<p>
322-
The gccgo compiler does not currently (2013-06-20) record
332+
The gccgo compiler does not currently (2015-06-15) record
323333
the file name of imported packages in the object file. You must
324334
arrange for the imported data to be linked into the program.
335+
Again, this is not necessary when building with the go command.
325336
</p>
326337

327338
<pre>

0 commit comments

Comments
 (0)