]> Cypherpunks repositories - gostls13.git/commitdiff
doc: mention the need for a C compiler for cgo support
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Jan 2016 22:56:08 +0000 (22:56 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Jan 2016 23:50:17 +0000 (23:50 +0000)
Fixes #13954

Change-Id: I4c01e9bb3fb08e8b9fa14d4c59b7ea824ba3f0c9
Reviewed-on: https://go-review.googlesource.com/18937
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
doc/install-source.html

index 7c1194a22c6722b17bb71169179a9f45670ea245..332c72097ea2b6da86ad1e1664bfbffb911d7931 100644 (file)
@@ -173,6 +173,21 @@ follow the instructions on the
 <a href="http://git-scm.com/downloads">Git downloads</a> page.
 </p>
 
+<h2 id="ccompiler">(Optional) Install a C compiler</h2>
+
+<p>
+To build a Go installation
+with <code><a href="/cmd/cgo">cgo</a></code> support, which permits Go
+programs to import C libraries, a C compiler such as <code>gcc</code>
+or <code>clang</code> must be installed first. Do this using whatever
+installation method is standard on the system.
+</p>
+
+<p>
+To build without <code>cgo</code>, set the environment variable
+<code>CGO_ENABLED=0</code> before running <code>all.bash</code> or
+<code>make.bash</code>.
+</p>
 
 <h2 id="fetch">Fetch the repository</h2>