From 177191237e7400d5f277405f7340bd95d9b09676 Mon Sep 17 00:00:00 2001
From: Shenghou Ma arm
(a.k.a. ARM
); 5g,5l,5c,5a
-The compilers can target the FreeBSD, Linux, NetBSD, OpenBSD, OS X (Darwin), +The compilers can target the FreeBSD, Linux, NetBSD, OpenBSD, OS X (Darwin), Plan 9, and Windows operating systems. The full set of supported combinations is listed in the discussion of environment variables below. @@ -273,9 +273,8 @@ The Go compilation environment can be customized by environment variables. to override the defaults.
-- -++
$GOROOT
+
$GOROOT
The root of the Go tree, often
-$HOME/go
. Its value is built into the tree when it is compiled, and @@ -284,7 +283,7 @@ There is no need to set this unless you want to switch between multiple local copies of the repository.+
$GOROOT_FINAL
$GOROOT_FINAL
The value assumed by installed binaries and scripts when
-$GOROOT
is not set explicitly. @@ -294,7 +293,7 @@ but move it elsewhere after the build, set$GOROOT_FINAL
to the eventual location.+
$GOOS
and$GOARCH
$GOOS
and$GOARCH
The name of the target operating system and compilation architecture. These default to the values of
$GOHOSTOS
and @@ -311,7 +310,7 @@ Choices for$GOARCH
are The valid combinations of$GOOS
and$GOARCH
are:-
- $GOOS
$GOARCH
+ $GOOS
$GOARCH
darwin
@@ -326,6 +325,9 @@ The valid combinations of 386
$GOOS
and$GOARCH
are:freebsd
amd64
+ +freebsd
+ arm
linux
386
@@ -341,6 +343,9 @@ The valid combinations of $GOOS
and$GOARCH
are:netbsd
amd64
+ +netbsd
+ arm
openbsd
386
@@ -350,6 +355,9 @@ The valid combinations of $GOOS
and$GOARCH
are:plan9
386
+ +plan9
+ amd64
windows
386
@@ -357,7 +365,7 @@ The valid combinations of $GOOS
and$GOARCH
are:+
$GOHOSTOS
and$GOHOSTARCH
$GOHOSTOS
and$GOHOSTARCH
The name of the host operating system and compilation architecture. These default to the local system's operating system and @@ -372,7 +380,7 @@ For example, you should not set
-$GOHOSTARCH
toarm
on an x86 system.
$GOBIN
+$GOBIN
The location where Go binaries will be installed. The default is
-$GOROOT/bin
. @@ -382,15 +390,38 @@ If$GOBIN
is set, the go command installs all commands there.+
$GOARM
(arm, default=6)$GO386
(for386
only, default is auto-detected +if built natively,387
if not)-The ARM architecture version the run-time libraries should target. -Setting
+$GOARM
to 5 causes the linker to emit calls -to a software floating point implementation instead of using -hardware floating point support. +This controls the code generated by 8g to use either the 387 floating-point unit +(set to387
) or SSE2 instructions (set tosse2
) for +floating point computations. ++
+ +GO386=387
: use x87 for floating point operations; should support all x86 chips (Pentium MMX or later). +GO386=sse2
: use SSE2 for floating point operations; has better performance than 387, but only available on Pentium 4/Opteron/Athlon 64 or later. +$GOARM
(forarm
only; default is auto-detected if building +on the target processor, 6 if not) ++This sets the ARM floating point co-processor architecture version the run-time +should target. If you are compiling on the target system, its value will be auto-detected. +
++
+GOARM=5
: use software floating point; when CPU doesn't have VFP co-processor +GOARM=6
: use VFPv1 only; default if cross compiling; usually ARM11 or better cores (VFPv2 or better is also supported) +GOARM=7
: use VFPv3; usually Cortex-A cores ++If in doubt, leave this variable unset, and adjust it if required +when you first run the Go executable. +The GoARM page +on the Go community wiki +contains further details regarding Go's ARM support.
-
Note that $GOARCH
and $GOOS
identify the