Commit 2a5879d1 authored by Andrew Gerrand's avatar Andrew Gerrand

doc: replace mentions of 6g with gc or the go command

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5846070
parent c58163c5
...@@ -275,16 +275,15 @@ p[len(p)-1] = suffix ...@@ -275,16 +275,15 @@ p[len(p)-1] = suffix
</step> </step>
<step title="Using this program" src="doc/codewalk/markov.go"> <step title="Using this program" src="doc/codewalk/markov.go">
To use this program, first compile and link it. To use this program, first build it with the
If you are using <code>6g</code> as your compiler, the command <a href="/cmd/go/">go</a> command:
would look something like this:
<pre> <pre>
$ 6g markov.go &amp;&amp; 6l -o markov markov.6</pre> $ go build markov.go</pre>
And then execute it while piping in some input text: And then execute it while piping in some input text:
<pre> <pre>
$ echo "a man a plan a canal panama" | ./markov -prefix=1 $ echo "a man a plan a canal panama" \
a plan a man a plan a canal panama | ./markov -prefix=1
</pre> a plan a man a plan a canal panama</pre>
Here's a transcript of generating some text using the Go distribution's Here's a transcript of generating some text using the Go distribution's
README file as source material: README file as source material:
<pre> <pre>
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
}--> }-->
<p><i> <p><i>
This applies to the 6g toolchain. Gccgo has native gdb support. Besides this This applies to the <code>gc</code> toolchain. Gccgo has native gdb support.
overview you might want to consult the Besides this overview you might want to consult the
<a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>. <a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
</i></p> </i></p>
<h2 id="Introduction">Introduction</h2> <h2 id="Introduction">Introduction</h2>
<p> <p>
When you compile and link your Go programs with the 6g/6l or 8g/8l toolchains When you compile and link your Go programs with the <code>gc</code> toolchain
on Linux, Mac OSX or FreeBSD, the resulting binaries contain DWARFv3 on Linux, Mac OSX or FreeBSD, the resulting binaries contain DWARFv3
debugging information that recent versions (>7.1) of the GDB debugger can debugging information that recent versions (>7.1) of the GDB debugger can
use to inspect a live process or a core dump. use to inspect a live process or a core dump.
......
...@@ -187,8 +187,8 @@ document server running in a production configuration on ...@@ -187,8 +187,8 @@ document server running in a production configuration on
Do Go programs link with C/C++ programs?</h3> Do Go programs link with C/C++ programs?</h3>
<p> <p>
There are two Go compiler implementations, <code>6g</code> and friends, There are two Go compiler implementations, <code>gc</code>
generically called <code>gc</code>, and <code>gccgo</code>. (the <code>6g</code> program and friends) and <code>gccgo</code>.
<code>Gc</code> uses a different calling convention and linker and can <code>Gc</code> uses a different calling convention and linker and can
therefore only be linked with C programs using the same convention. therefore only be linked with C programs using the same convention.
There is such a C compiler but no C++ compiler. There is such a C compiler but no C++ compiler.
...@@ -994,7 +994,7 @@ Why is <code>int</code> 32 bits on 64 bit machines?</h3> ...@@ -994,7 +994,7 @@ Why is <code>int</code> 32 bits on 64 bit machines?</h3>
<p> <p>
The sizes of <code>int</code> and <code>uint</code> are implementation-specific The sizes of <code>int</code> and <code>uint</code> are implementation-specific
but the same as each other on a given platform. but the same as each other on a given platform.
The 64 bit Go compilers (both 6g and gccgo) use a 32 bit representation for The 64 bit Go compilers (both gc and gccgo) use a 32 bit representation for
<code>int</code>. Code that relies on a particular <code>int</code>. Code that relies on a particular
size of value should use an explicitly sized type, like <code>int64</code>. size of value should use an explicitly sized type, like <code>int64</code>.
On the other hand, floating-point scalars and complex On the other hand, floating-point scalars and complex
...@@ -1321,7 +1321,7 @@ and uses a variant of the Plan 9 loader to generate ELF/Mach-O/PE binaries. ...@@ -1321,7 +1321,7 @@ and uses a variant of the Plan 9 loader to generate ELF/Mach-O/PE binaries.
</p> </p>
<p> <p>
We considered writing <code>6g</code>, the original Go compiler, in Go itself but We considered writing <code>gc</code>, the original Go compiler, in Go itself but
elected not to do so because of the difficulties of bootstrapping and elected not to do so because of the difficulties of bootstrapping and
especially of open source distribution&mdash;you'd need a Go compiler to especially of open source distribution&mdash;you'd need a Go compiler to
set up a Go environment. <code>Gccgo</code>, which came later, makes it possible to set up a Go environment. <code>Gccgo</code>, which came later, makes it possible to
...@@ -1331,7 +1331,7 @@ parser are already available in the <a href="/pkg/go/"><code>go</code></a> packa ...@@ -1331,7 +1331,7 @@ parser are already available in the <a href="/pkg/go/"><code>go</code></a> packa
</p> </p>
<p> <p>
We also considered using LLVM for <code>6g</code> but we felt it was too large and We also considered using LLVM for <code>gc</code> but we felt it was too large and
slow to meet our performance goals. slow to meet our performance goals.
</p> </p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment