Commit Graph

38 Commits

Author SHA1 Message Date
Mingli Yu
70a862a367 go.bbclass: separate the ptest logic to go-ptest class
The current go class includes ptest logic by default
and will make the recipe which inherits go class
to support ptest automatically though maybe the
recipe which inherits go class doesn't plan to
support the ptest.

So separate the ptest logic to another specified
class go-ptest to make the recipe which needs to
inherit go class more flexible with regards to
ptest support.

(From OE-Core rev: 099a2a212fed61a24643da63c74c09cef3ba4030)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-09 23:30:44 +01:00
Ricardo Ribalda Delgado
1a82468d2d go: avoid host contamination by GOCACHE
By default GOCACHE is set to $HOME/.cache.

Fixes:
ERROR: go-cross-dbfp4-1.12.1-r0 do_compile: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120
Log data follows:
| DEBUG: Executing shell function do_compile
| Building Go cmd/dist using /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/recipe-sysroot-native/usr/lib/go.
| failed to initialize build cache at /home/pokyuser/.cache/go-build: mkdir /home/pokyuser/.cache: permission denied
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120)
ERROR: Task (/workdir/repo/poky/meta/recipes-devtools/go/go-cross_1.12.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 23 tasks of which 16 didn't need to be rerun and 1 failed.

(From OE-Core rev: 9a6d208b9979035bbfc1def80fb6558db4bddb12)

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21 15:32:36 +01:00
Alex Kiernan
f0aa7f09a4 go: Exclude vcs files when installing deps
Because our clones use the host git, on (say) Ubuntu 18.04, the local
git directories acquire perl scripts such as fsmonitor-watchman.sample.
During packaging, this leads to failures:

  ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA Issue: /usr/lib/go/pkg/dep/sources/https---github.com-nsf-termbox--go/.git/hooks/fsmonitor-watchman.sample contained in package go-hsperfdata-staticdev requires /usr/bin/perl, but no providers found in RDEPENDS_go-hsperfdata-staticdev? [file-rdeps]
  ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
  ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa:
  ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: Function failed: do_package_qa

(From OE-Core rev: 2ee246524ab881d57d8aac204f671215a25a58d3)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08 12:15:17 +01:00
Richard Purdie
cd87283738 go.bbclass: Remove unused override
The x86 override means the i586 one isn't necessary.

(From OE-Core rev: 1658bf2dbdfe1a5b38efcc03359c9937506c120c)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12 09:29:06 +01:00
Mark Asselstine
bb04858ea6 go.bbclass: Export more GO* environment variables
Currently we are not doing a good job of consolidating GO environment
variables used by the go build system in the go.bbclass, instead we
are relying on the individual GO recipe authors to perform the
exports. This can result in inconsistent build results and often
binaries that are not properly cross compiled, resulting in segfaults
when the applications are run on the target.

For example the GO documentation recommends that the environment
include a value assigned to GOARM when cross building for ARMv5, ARMv6
and ARMv7 (https://github.com/golang/go/wiki/GoArm).

In order to avoid polluting the build scripts with unnecessary
exports, such as run.do_compile, we attempt to only export variables
when they apply to a specific arch.

(From OE-Core rev: 6300c4a83f7c8fc88702798ffe25bd6d57091673)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10 13:46:17 +01:00
Khem Raj
e53aa46f43 go: Add recipes for 1.12 release and make it default
- Refresh patches
- Enable GOCACHE required as of Go 1.12

(From OE-Core rev: f559fd6df2978f9093672794420eada2b7452987)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09 14:43:11 +00:00
Richard Purdie
e06de80a61 go: Change from TARGET_ARCH to TUNE_PKGARCH
Right now go-cross is changing signatures when you change TUNE for a given
architecture. In particular this breaks layer tests like:

yocto-check-layer ../meta-yocto-bsp/ --machines qemuarm beaglebone-yocto

This changes the PN addtion to something containing the tune rather than
the arch which avoids these kinds of errors. If go-cross can be tune
independent that would be nice but currently that isn't the case.

[YOCTO #12586]

(From OE-Core rev: e3c7e1703499e6a5332d9ab8a941671ec8235c4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Robert Yang
bdb4964787 go.bbclass: Add -buildmode=pie for non mips arch
Fixed QA issue like:
WARNING: runc-docker do_package_qa: QA Issue: ELF binary '/path/to/runc-docker/usr/bin/runc' has relocations in .text [textrel]

(From OE-Core rev: 8dcd4e6e791c3a8b8bf5e69dca9bb9c887231d69)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-01 13:04:50 +01:00
Matt Madison
3ffafcd9cf go.bbclass, goarch.bbclass: update SECURITY_CFLAGS
With go1.10 the NOPIE flags are only required for
MIPS target builds, and are now incompatible for
the other architectures.

(From OE-Core rev: f2ff90eb7d27a2f69f5948fa8c301de30f5c8132)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
13fd7abbe0 go.bbclass: ptest cleanup and improvements
* Don't enable verbose test output (-test.v)
  by default, as it generates too much noise
  for automated results parsing

* Override do_install_ptest_base in the bbclass,
  so recipes can provide their own modifications
  with do_install_ptest.

* Improve the generated run-ptest script to better
  handle large numbers of tests, and to generate
  'status: test name' output similar to Automake
  tests.

* Install all non-vendored 'testdata' directories
  from the source into the ptest package, as some
  packages share test data among multiple tests.

(From OE-Core rev: 11037462d80cefbee90a69e6a8a95895375ed6da)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
02b8eae8c7 go.bbclass: don't stage test data with sources
Any directory in a Go package's source tree called
'testdata' contains test data, and isn't necessary
for building.

Some packages include ELF files and other binaries
as test data, and staging them in the sysroot and
-dev package leads to unnecessary QA warnings.

(From OE-Core rev: b013db7ab58d4d56ad5c6e54a3a32df31aaf8809)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
b6ff2564e9 go.bbclass: remove debug-related commands
The 'go env' in the do_compile function and
the set -x/+x in the do_install_ptest function
were used for debugging the bbclass, and aren't
really needed.

(From OE-Core rev: 351e9fc39408e094bbb4beedf51221adc8afd143)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
29af62dfa0 go.bbclass: rename GO_TMPDIR -> GOTMPDIR
and export it. Go 1.10 now supports using this
separate variable locating its temporary files.

TMPDIR is still set, for compatibility with go1.9;
that can be dropped once 1.9 is retired.

(From OE-Core rev: ce9d70ae2f9981bf5b42641922c34c1ed54eeca3)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
7a4ca89b55 go: update go 1.9 -> go 1.10
* Patches and recipes reworked for go 1.10's significant
  changes to its bootstrap and build steps.

* Update go1.4 source tarball used for go-native
  bootstrapping to the version recommended
  in the current go documentation

* Remove test data from installed sources to eliminate
  some packaging QA warnings

* Set GOCACHE to 'off' to disable 1.10's build caching
  in the go recipes and bbclass

* Update go_do_compile to compile both static and
  dynamic objects dynamic linking is in use, since
  go1.10's build tool is pickier about this

(From OE-Core rev: 4fd749ca6450a4870be1c1e13802f084b6eb0db6)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Joshua Watt
feded5fe27 utils.py: add parallel make helpers
The code to extract the integer number of parallel build threads and
construct a new argument from them has started to be copied in multiple
locations, so create two new helper utilities to aid recipes.

The first helper (parallel_make()) extracts the integer number of
parallel build threads from PARALLEL_MAKE. The second
(parallel_make_argument()) does the same and then puts the result back
into a format string, optionally clamping it to some maximum value.

Additionally, rework the oe-core recipes that were manually doing this
to use the new helper utilities.

(From OE-Core rev: ccd1142d22b31ed85d8823b1bc9e11ccfd72b61f)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-16 18:05:40 +00:00
Matt Madison
af1ee398b3 go: disable PIE flags for cgo
If the security_flags.inc file is included, gcc
will do PIE builds by default.  These flags need
to be disabled for go packages that use cgo.

(From OE-Core rev: 5d84042852380fc88b9be8df0e4eeac612c2a6da)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26 11:05:00 +01:00
Matt Madison
e1fd36cd6d go.bbclass: set TMPDIR during compilation
The go build tool creates working directories under
$TMPDIR for all of its processing.  Create a directory
under ${WORKDIR} for this and point TMPDIR at it during
compilation, so that systems that have a relatively
small /tmp filesystems can still compile larger Go
packages.

(From OE-Core rev: 5de3de12c70f01753491c46b5622b0d273c3257b)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21 09:05:50 +01:00
Matt Madison
975246ffe6 go: fix linking issues for nativesdk builds
Switch to using an external linker for nativesdk
go, go-runtime, and go package builds, which works
more reliably when building 32-bit SDKs.

(From OE-Core rev: f76779f7ef6636355a5aa5741a736f5234a67fdb)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21 09:05:50 +01:00
Otavio Salvador
a9fdf491ca go.bbclass: Add ptest support
This adds ptest support for Go packages so its unittest content is
packaged and integrated onto the test framework.

(From OE-Core rev: 2343cd90b9706589b33510c560ed83a9648fb133)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14 11:35:45 +01:00
Otavio Salvador
d61d4823a9 go.bbclass: Add "ldflags" to QA skip list
Currently every Go package will end with GNU_HASH in the ELF binary
however adding it to every recipe is cumbersome so instead we handle
that here.

(From OE-Core rev: 6699e668413c10704ffa8094b3dca67a9b88422a)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14 11:35:45 +01:00
Matt Madison
05c439a325 go.bbclass: add support linking against shared runtime
For architectures that support it, use the -linkshared
build option to build packages against the shared Go
runtime.

(From OE-Core rev: 5624a773e4db3ad2251641e69b04dc380e74a4c7)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14 11:35:45 +01:00
Matt Madison
d7f07283de go.bbclass: enable nativesdk builds for Go packages
Adding the necessary overrides for nativesdk builds.

(From OE-Core rev: 83ad0bdb8a426b0beb3775cfb109ddb3936b7de1)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Matt Madison
4c6ce2b647 go.bbclass: clean up CGO_xxx settings
* use conditional assignment for  the CGO_xxx
  variables, so they can be overridden more easily
* remove the TOOLCHAIN_OPTIONS and TARGET_CC_ARCH
  references, since those are already present in
  CC and CXX
* remove the TARGET_ prefix so the values are
  appropriate for native, nativesdk, etc. builds
* move the GOROOT export away from the CGO settings
  and closer to its definition

(From OE-Core rev: 088528021d6979a8e2d6bc33d63a166e300cfde4)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Matt Madison
397881ff1b go.bbclass: remove some xxx_FINAL variables
GOROOT_FINAL is used by the Go linker for rewriting
source paths when the build GOROOT is not the same
as the runtime GOROOT, but the other _FINAL variables
aren't really needed.

(From OE-Core rev: 31aa0d8a62be95d093d3c7581efa41f74b9131ad)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Matt Madison
2c3e27b71b go.bbclass: remove GO_GCFLAGS nad GO_LDFLAGS
These variables are not used anywhere.

(From OE-Core rev: 2d37f60c2606de216aaa2d593b73b1de0a5c031e)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Matt Madison
9060b87711 go: split out go-runtime into separate recipe
Reorganize the Go toolchain build to split out
the Go standard runtime libraries into a separate
recipe.  This simplifies the extension to crosssdk
and cross-canadian builds.

* Adds a patch to the go build tool to prevent it
  from trying to rebuild anything in GOROOT, which
  is now resident in the target sysroot.

* 'go' bb and inc files are now for building the
  compiler for the target only.

* 'go-cross' bb and inc files are now just for
  the cross-compiler.

* Adds virtual/<prefix> PROVIDES for the compiler
  and runtime

* Removes testdata directories from the sysroot
  during staging, as they are unnecessary and
  can cause strip errors (some of the test files
  are ELF files).

* Re-enables pacakage QA checks, adding selective
  INSANE_SKIP settings where needed.

(From OE-Core rev: d2a7af7cd834e218c39d43ee3fa0c14d4f748727)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Matt Madison
245285e3be go.bbclass: add GO_INSTALL_FILTEROUT variable
When using the Go 'vendor' mechanism to bring in
dependencies for a Go package, the default GO_INSTALL
setting, which uses the '...' wildcard, will include
the vendored packages in the build, which produces
incorrect results.

There are also some Go packages that are structured
poorly, so that the '...' wildcard results in building
example or test code that should not be included in
the build, or fail to build.

This patch adds a mechanism for filtering out a
subset of the sources.  It defaults to filtering
out everything under the 'vendor' subdirectory
under package's main directory, which is the
normal location for vendored packages, but can
be overridden by a recipe to filter out other
subdirectories, if needed.

(From OE-Core rev: 9819353726d85780546158428bd97a253705017d)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Matt Madison
7149219b76 go.bbclass: add do_unpack function to handle common cases
Go source trees have a particular structure, with all
sources located under ${GOROOT}/src/<import-path>.
The fetcher step implemented by the 'go get' command
automatically follows this structure, so we need
to do the same here.

Since most Go packages are hosted in git repositories,
this adds a custom do_unpack() function that sets
the destsuffix to match the expected directory structure,
for any git SRC_URIs that haven't had a destsuffix
explicitly set in the recipe.

This simplifies recipe writing for the most common
cases.

(From OE-Core rev: efcf6513b71021ea4bfe6fbaa326e6591dee487d)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Matt Madison
07ef4dd93d go.bbclass: separate ${S} and ${B}
Add a do_configure task to populate ${B} by symlinking
in the src subdirectory under ${S}, which lets us point
GOPATH at ${B}.  This lets us take advantage of the
automatic directory creation and cleaning for do_configure.

This necessitates a change to do_install to split the
installation of the sources and built artifacts.  Taking
advantage of some additional tar options, we can eliminate
the extra staging area and extra recursive chown command.
So overall efficiency should be improved.

(From OE-Core rev: c62a083306c26b7e4deca1ff41336bb6b33d5b3a)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Otavio Salvador
f01000da80 go.bbclass: Use an auxiliary variable to add the build dependencies
This is going to easy the addition of nativesdk and virtual providers
in the future.

This change is based on the meta-golang[1] layer. Thanks to Matt
Madison <matt@madison.systems> for his work on this.

1. https://github.com/madisongh/meta-golang

(From OE-Core rev: 497136297f15858903b5170a8616d0cb427a995d)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Matt Madison
2381d15cc6 go.bbclass: exported function cleanup
Since this is a class, it should follow the
class function export mechanism for its task
functions, and should set directory-related
flags for directories they need.

(From OE-Core rev: 0369a99ad1c9e3a9a6394c723461795460dc2c76)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Otavio Salvador
6640f4070e go.bbclass: Enable parallel build
The parallel build is based on PARALLEL_MAKE variable but can be
overriden setting the GO_PARALLEL_BUILD one.

This change is based on the meta-golang[1] layer. Thanks to Matt
Madison <matt@madison.systems> for his work on this.

1. https://github.com/madisongh/meta-golang

(From OE-Core rev: 7a40ea8fc358aa134ad86862591329f94d0f3718)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Otavio Salvador
7a7f0e846f go.bbclass: Use a global Go build flags
We now use a GOBUILDFLAGS to provide a global variable to control the
build flags to be given to Go.

This change is based on the meta-golang[1] layer. Thanks to Matt
Madison <matt@madison.systems> for his work on this.

1. https://github.com/madisongh/meta-golang

(From OE-Core rev: d6b8e7e94ba6dae44907c5a65bc0bdf0ccebdb15)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Otavio Salvador
8a43f94d1d go.bbclass: Fix binary installation path detection
Go toolchain changes the installation path when building for the same
architecture as the build host. This was already been considered in
the GO_BUILD_BINDIR variable but was not being used by the go class.

This fixes following error:

,----
| ERROR: go-dep-0.3.0-r0 do_package: QA Issue: go-dep: Files/directories
| were installed but not shipped in any package:
|   /usr/lib/x86_64-oel-linux/go/bin/dep
| Please set FILES such that these items are packaged. Alternatively if
| they are unneeded, avoid installing them or delete them within
| do_install.
`----

(From OE-Core rev: 56ce355b3d775e801d2ca89ee812571e794311cd)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 17:30:30 +01:00
Joe Slater
25717652b6 go: centralize definition of COMPATIBLE_HOST
Put it in goarch.bbclass which all go related recipes inherit.

(From OE-Core rev: 9e899bbc081cb932c1492f6d6802b908d70ef42f)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert P. J. Day
f5187871ce classes: Replace "if test" file tests with POSIX file tests
In entire meta/classes/ directory, replace shell tests of the form
"if test -? ..." with POSIX tests of the form "if [ -? ...

(From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Khem Raj
c46c25dcfe go: Enable on musl
Working fine for musl targets now

(From OE-Core rev: 1bab5be8133f62cdae251e66db6f472c3c37297c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Khem Raj
760e81678c go: Add recipes for golang compilers and tools
* This is converging the recipes for go from
  meta-virtualization and oe-meta-go

* Add recipes for go 1.7

* go.bbclass is added to ease out writing
  recipes for go packages

* go-examples: Add an example, helloworld written in go
  This should serve as temlate for writing go recipes

* Disable for musl, at least for now

* Disable for x32/ppc32 which is not supported

(From OE-Core rev: 78615e9260fb5d6569de4883521b049717fa4340)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 15:51:55 +00:00