This fixes how GOARM is selected for arm platforms, based on support for
VFP/VFPv3 rather than CPU version.
Fixes#10967.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This adds support to compile host and target Go as position-independent
executables.
Host Go will have PIE enabled if Go supports PIE on the host platform.
Target Go will have PIE enabled if Go supports PIE on the target
platform and CONFIG_PKG_ASLR_PIE is selected.
Go 1.13 supports PIE for x86 and arm targets; mips support is in
progress[1].
[1]: https://github.com/golang/go/issues/21222#issuecomment-542064462
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This replaces conditional functions with conditional directives to make
golang-values.mk more readable.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This changes the formatting of environment variable unexports in
golang-values.mk to be more maintainable, and to document the sources of
variables.
There should be no change to the actual list of variables unexported.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Go 1.13 added a new -trimpath option to the "go build" command[1] that
removes system paths from compiled executables. This replaces the
previous -trimpath flags.
There are still system paths in the compiled executable (for crti.o and
crtn.o, when cross-compiling); these appear to be stripped during the
packaging process.
[1]: https://golang.org/doc/go1.13#trimpath
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This adds several variables for Go package Makefiles:
* GO_PKG_GCFLAGS - go tool compile arguments
* GO_PKG_LDFLAGS - go tool link arguments
* GO_PKG_LDFLAGS_X - go tool link -X definitions
Settings these will add the corresponding flags to the go install
command line. (Other command line arguments can still be added by
passing them as the first argument to GoPackage/Build/Compile.)
This also adds Go's runtime environment variables (GOGC, GOMAXPROCS,
GOTRACEBACK) to the unexport list.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Go 1.11 added softfloat support for 64-bit MIPS systems[1], so this also
adds builds for mips64 and mips64el.
[1] https://golang.org/doc/go1.11#mips
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
From golang.org:
The Go programming language is an open source project to make
programmers more productive.
This commit consists of two "parts":
* golang/host: Main Go compiler for host (installed to
STAGING_DIR_HOST/lib/go-cross), used to cross-compile Go programs to
be packaged.
* golang (and golang-src/golang-doc): Main Go compiler for on-target
development. These packages are quite large, but I would expect only
developers to install these.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>