Left: | ||
Right: |
OLD | NEW |
---|---|
1 <!--{ | 1 <!--{ |
2 "Title": "Installing Go from source", | 2 "Title": "Installing Go from source", |
3 "Path": "/doc/install/source" | 3 "Path": "/doc/install/source" |
4 }--> | 4 }--> |
5 | 5 |
6 <h2 id="introduction">Introduction</h2> | 6 <h2 id="introduction">Introduction</h2> |
7 | 7 |
8 <p> | 8 <p> |
9 Go is an open source project, distributed under a | 9 Go is an open source project, distributed under a |
10 <a href="/LICENSE">BSD-style license</a>. | 10 <a href="/LICENSE">BSD-style license</a>. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 <dt> | 50 <dt> |
51 <code>386</code> (a.k.a. <code>x86</code> or <code>x86-32</code>); <code >8g,8l,8c,8a</code> | 51 <code>386</code> (a.k.a. <code>x86</code> or <code>x86-32</code>); <code >8g,8l,8c,8a</code> |
52 </dt> | 52 </dt> |
53 <dd> | 53 <dd> |
54 Comparable to the <code>amd64</code> port. | 54 Comparable to the <code>amd64</code> port. |
55 </dd> | 55 </dd> |
56 <dt> | 56 <dt> |
57 <code>arm</code> (a.k.a. <code>ARM</code>); <code>5g,5l,5c,5a</code> | 57 <code>arm</code> (a.k.a. <code>ARM</code>); <code>5g,5l,5c,5a</code> |
58 </dt> | 58 </dt> |
59 <dd> | 59 <dd> |
60 » Supports only Linux binaries. Less widely used than the other ports and therefore | 60 » Supports Linux, FreeBSD and NetBSD binaries. Less widely used than the o ther ports, but it is |
dfc
2013/02/10 23:58:12
I would just say "Less widely used than the other
| |
61 » not as thoroughly tested. | 61 » working reliably. |
62 </dd> | 62 </dd> |
63 </dl> | 63 </dl> |
64 | 64 |
65 <p> | 65 <p> |
66 Except for things like low-level operating system interface code, the run-time | 66 Except for things like low-level operating system interface code, the run-time |
67 support is the same in all ports and includes a mark-and-sweep garbage | 67 support is the same in all ports and includes a mark-and-sweep garbage |
68 collector, efficient array and string slicing, and support for efficient | 68 collector, efficient array and string slicing, and support for efficient |
69 goroutines, such as stacks that grow and shrink on demand. | 69 goroutines, such as stacks that grow and shrink on demand. |
70 </p> | 70 </p> |
71 | 71 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 Choices for <code>$GOOS</code> are | 327 Choices for <code>$GOOS</code> are |
328 <code>darwin</code> (Mac OS X 10.6 and above), <code>freebsd</code>, | 328 <code>darwin</code> (Mac OS X 10.6 and above), <code>freebsd</code>, |
329 <code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,· | 329 <code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,· |
330 <code>plan9</code>, and <code>windows</code>. | 330 <code>plan9</code>, and <code>windows</code>. |
331 Choices for <code>$GOARCH</code> are | 331 Choices for <code>$GOARCH</code> are |
332 <code>amd64</code> (64-bit x86, the most mature port), | 332 <code>amd64</code> (64-bit x86, the most mature port), |
333 <code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM). | 333 <code>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM). |
334 The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are: | 334 The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are: |
335 <table cellpadding="0"> | 335 <table cellpadding="0"> |
336 <tr> | 336 <tr> |
337 <th width="50"><th align="left" width="100"><code>$GOOS</code></th> <th align="l eft" width="100"><code>$GOARCH</code></th> <th align="left"></th> | 337 <th width="50"></th><th align="left" width="100"><code>$GOOS</code></th> <th ali gn="left" width="100"><code>$GOARCH</code></th> |
338 </tr> | 338 </tr> |
339 <tr> | 339 <tr> |
340 <td></td><td><code>darwin</code></td> <td><code>386</code></td> | 340 <td></td><td><code>darwin</code></td> <td><code>386</code></td> |
341 </tr> | 341 </tr> |
342 <tr> | 342 <tr> |
343 <td></td><td><code>darwin</code></td> <td><code>amd64</code></td> | 343 <td></td><td><code>darwin</code></td> <td><code>amd64</code></td> |
344 </tr> | 344 </tr> |
345 <tr> | 345 <tr> |
346 <td></td><td><code>freebsd</code></td> <td><code>386</code></td> | 346 <td></td><td><code>freebsd</code></td> <td><code>386</code></td> |
347 </tr> | 347 </tr> |
348 <tr> | 348 <tr> |
349 <td></td><td><code>freebsd</code></td> <td><code>amd64</code></td> | 349 <td></td><td><code>freebsd</code></td> <td><code>amd64</code></td> |
350 </tr> | 350 </tr> |
351 <tr> | 351 <tr> |
352 <td></td><td><code>freebsd</code></td> <td><code>arm</code></td> | |
353 </tr> | |
354 <tr> | |
352 <td></td><td><code>linux</code></td> <td><code>386</code></td> | 355 <td></td><td><code>linux</code></td> <td><code>386</code></td> |
353 </tr> | 356 </tr> |
354 <tr> | 357 <tr> |
355 <td></td><td><code>linux</code></td> <td><code>amd64</code></td> | 358 <td></td><td><code>linux</code></td> <td><code>amd64</code></td> |
356 </tr> | 359 </tr> |
357 <tr> | 360 <tr> |
358 <td></td><td><code>linux</code></td> <td><code>arm</code></td> | 361 <td></td><td><code>linux</code></td> <td><code>arm</code></td> |
359 </tr> | 362 </tr> |
360 <tr> | 363 <tr> |
361 <td></td><td><code>netbsd</code></td> <td><code>386</code></td> | 364 <td></td><td><code>netbsd</code></td> <td><code>386</code></td> |
362 </tr> | 365 </tr> |
363 <tr> | 366 <tr> |
364 <td></td><td><code>netbsd</code></td> <td><code>amd64</code></td> | 367 <td></td><td><code>netbsd</code></td> <td><code>amd64</code></td> |
365 </tr> | 368 </tr> |
366 <tr> | 369 <tr> |
370 <td></td><td><code>netbsd</code></td> <td><code>arm</code></td> | |
371 </tr> | |
372 <tr> | |
367 <td></td><td><code>openbsd</code></td> <td><code>386</code></td> | 373 <td></td><td><code>openbsd</code></td> <td><code>386</code></td> |
368 </tr> | 374 </tr> |
369 <tr> | 375 <tr> |
370 <td></td><td><code>openbsd</code></td> <td><code>amd64</code></td> | 376 <td></td><td><code>openbsd</code></td> <td><code>amd64</code></td> |
371 </tr> | 377 </tr> |
372 <tr> | 378 <tr> |
373 <td></td><td><code>plan9</code></td> <td><code>386</code></td> | 379 <td></td><td><code>plan9</code></td> <td><code>386</code></td> |
374 </tr> | 380 </tr> |
375 <tr> | 381 <tr> |
382 <td></td><td><code>plan9</code></td> <td><code>amd64</code></td> | |
dfc
2013/02/10 23:58:12
Is plan 9 officially supported ? I thought the pli
| |
383 </tr> | |
384 <tr> | |
376 <td></td><td><code>windows</code></td> <td><code>386</code></td> | 385 <td></td><td><code>windows</code></td> <td><code>386</code></td> |
377 </tr> | 386 </tr> |
378 <tr> | 387 <tr> |
379 <td></td><td><code>windows</code></td> <td><code>amd64</code></td> | 388 <td></td><td><code>windows</code></td> <td><code>amd64</code></td> |
380 </tr> | 389 </tr> |
381 </table> | 390 </table> |
382 | 391 |
383 <p><code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code></p> | 392 <p><code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code></p> |
384 <p> | 393 <p> |
385 The name of the host operating system and compilation architecture. | 394 The name of the host operating system and compilation architecture. |
(...skipping 12 matching lines...) Expand all Loading... | |
398 <p><code>$GOBIN</code> | 407 <p><code>$GOBIN</code> |
399 <p> | 408 <p> |
400 The location where Go binaries will be installed. | 409 The location where Go binaries will be installed. |
401 The default is <code>$GOROOT/bin</code>. | 410 The default is <code>$GOROOT/bin</code>. |
402 After installing, you will want to arrange to add this | 411 After installing, you will want to arrange to add this |
403 directory to your <code>$PATH</code>, so you can use the tools. | 412 directory to your <code>$PATH</code>, so you can use the tools. |
404 If <code>$GOBIN</code> is set, the <a href="/cmd/go">go command</a> | 413 If <code>$GOBIN</code> is set, the <a href="/cmd/go">go command</a> |
405 installs all commands there. | 414 installs all commands there. |
406 </p> | 415 </p> |
407 | 416 |
408 <p><code>$GOARM</code> (arm, default=6)</p> | 417 <p><code>$GO386</code> (for 386 only, default is auto detected if build natively , 387 if not)</p> |
dfc
2013/02/10 23:58:12
s/build/built/
| |
409 <p> | 418 <p> |
410 The ARM architecture version the run-time libraries should target. | 419 This controls the code generated by 8g to use either 387 FPU (set to <code>387</ code>) or |
411 Setting <code>$GOARM</code> to 5 causes the linker to emit calls | 420 SSE2 (set to <code>sse2</code>) for floating point computations. |
412 to a software floating point implementation instead of using | 421 </p> |
413 hardware floating point support. | 422 <table> |
423 </table> | |
424 | |
425 <p><code>$GOARM</code> (for arm only, default is auto detected if build natively , 6 if not)</p> | |
dfc
2013/02/10 23:58:12
same
| |
426 <p> | |
427 This sets the ARM floating point coprocessor architecture version the run-time | |
428 libraries should target. If you are compiling on target system natively, its | |
dfc
2013/02/10 23:58:12
s/libraries //
| |
429 value will be auto detected. | |
430 </p> | |
431 <table> | |
432 <tr> | |
433 <th width="50"><th align="left"><code>$GOARM</code></th> <th align="left">Meanin g</th> <th align="left">Note</th> | |
434 </tr> | |
435 <tr> | |
436 <td></td><td><code>5</code></td> <td>use software floating point</td> <td>when C PU doesn't have VFP</td> | |
dfc
2013/02/10 23:58:12
have a VFP co-processor ?
| |
437 </tr> | |
438 <tr> | |
439 <td></td><td><code>6</code></td> <td>use VFPv1 only</td> <td>default if cross co mpiling; ARM11 cores</td> | |
440 </tr> | |
441 <tr> | |
442 <td></td><td><code>7</code></td> <td>use VFPv3</td> <td>Cortex-A cores</td> | |
443 </tr> | |
444 </table> | |
445 <p> | |
446 If in doubt, leave this variable alone, and adjust it as suggested | |
447 when you first run the Go executable on target machine. | |
448 The <a href="http://code.google.com/p/go-wiki/wiki/GoArm">GoARM</a> page | |
449 on the <a href="http://code.google.com/p/go-wiki/w/list">Go community wiki</a> | |
450 may contain further details regarding Go's ARM support. | |
414 </p> | 451 </p> |
415 | 452 |
416 </blockquote> | 453 </blockquote> |
417 | 454 |
418 <p> | 455 <p> |
419 Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the | 456 Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the |
420 <em>target</em> environment, not the environment you are running on. | 457 <em>target</em> environment, not the environment you are running on. |
421 In effect, you are always cross-compiling. | 458 In effect, you are always cross-compiling. |
422 By architecture, we mean the kind of binaries | 459 By architecture, we mean the kind of binaries |
423 that the target environment can run: | 460 that the target environment can run: |
(...skipping 12 matching lines...) Expand all Loading... | |
436 <pre> | 473 <pre> |
437 export GOROOT=$HOME/go | 474 export GOROOT=$HOME/go |
438 export GOARCH=amd64 | 475 export GOARCH=amd64 |
439 export GOOS=linux | 476 export GOOS=linux |
440 </pre> | 477 </pre> |
441 | 478 |
442 <p> | 479 <p> |
443 although, to reiterate, none of these variables needs to be set to build, | 480 although, to reiterate, none of these variables needs to be set to build, |
444 install, and develop the Go tree. | 481 install, and develop the Go tree. |
445 </p> | 482 </p> |
OLD | NEW |