summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-cross.inc
AgeCommit message (Collapse)Author
2022-03-15go: Remove three unnecessary paths from do_compile[dirs]Peter Kjellerstedt
There is no reason to include a path in foo[dirs] if it is also in foo[cleandirs] (except if it is the last path in foo[dirs]). (From OE-Core rev: 9f610748f760b2d58d5250b55ae4b268909f33ef) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25go: Extract common environment setup.Alex Kube
Add default values for go environment variables to go-common.inc. Override where appropriate in other go*.inc files, and use host/target tuples from goarch for setting CC flags. (From OE-Core rev: 1e3f040b1f68fa1f808851ecd9623544e935e9ad) Signed-off-by: Alex Kube <alexander.j.kube@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21go: avoid host contamination by GOCACHERicardo Ribalda Delgado
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-03-09go: Add recipes for 1.12 release and make it defaultKhem Raj
- 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>
2018-11-07go: Change from TARGET_ARCH to TUNE_PKGARCHRichard Purdie
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-03-06go: move common settings to go-common.incMatt Madison
Eliminate some redundancy in the recipes by moving some commonly-used variable settings to the common include file. Also removed a duplicate inherit from go-target.inc that was already in go-common.inc. (From OE-Core rev: e72d2a7b7ee7913095a35ae92c3ca364de00c8a7) 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-06go: set GOMIPS envrionment variableMatt Madison
Go 1.10 adds support for selecting hard/soft float object code through the GOMIPS environment variable. (From OE-Core rev: f3cabc92dca3408da18f04e4af4051fba1f63c14) 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-06go: update go 1.9 -> go 1.10Matt Madison
* 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>
2017-10-16go: Export correct GO386 value for targetPaul Barker
When compiling go code for the target we need to ensure that GO386 is exported and set appropriately. This controls whether sse/sse2 instructions are used to implement floating-point operations or not. (From OE-Core rev: eba5fd5f594d65d311fa7564fa4b243248cb212a) Signed-off-by: Paul Barker <pbarker@toganlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26meta: drop True option to getVar callsMing Liu
Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: dbc0eaf478feb3f752ae22fd184984494fc85d0a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14go: update to go 1.9Matt Madison
* Rebased patches - dropped armhf-elf patch, should no longer be needed - dropped syslog patch which should not have been imported to begin with - reworked other patches as needed for the updated code base * Updated native, cross, cross-canadian .inc files to remove some testdata directories that contain .a files that strip chokes on during sysroot staging (From OE-Core rev: f2ccf56778433ec16f44eecaa10a610a6630df50) 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-12go-cross: take GOARM environment settingMatt Madison
Instead of hard-coding GOARM to ${TARGET_GOARM} in the wrapper script, take it from an existing environment setting if present. This allows the same cross-compiler to be used for different ARM targets. (From OE-Core rev: 1d319f102cd1f37ce5629c73948efae01478f866) 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-12go: split out go-runtime into separate recipeMatt Madison
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-07-27go: centralize definition of COMPATIBLE_HOSTJoe Slater
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-06-05go: Upgrade to 1.8.3Khem Raj
Add a comment to fix build musl<->glibc switch while using same TMPDIR (From OE-Core rev: bc940753ee4af8c656f33d63e33c3d12d419446e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12recipes/*-cross recipes: ignore TARGET_ARCH sstate hashPatrick Ohly
"yocto-compat-layer.py --machines" showed that shared packages like gcc-cross-powerpc64 have a sstate signature that depends on TUNEFLAGS. As a result, there are unnecessary rebuilds and potential conflicts in a multiconfig. That's due to the way how TARGET_ARCH is set. Richard Purdie suggested setting TARGET_ARCH[vardepvalue] as fix, which works. It would be shorter to do that in cross.bbclass instead of repeating the relevant line in different recipes, but Richard was concerned about potential side-effects in other usages of cross.bbclass. TARGET_GOARM as used in go.inc is still causing signature differences for go-cross-powerpc64 and machines b4420qds-64b and p5020ds-64b. This needs further investigation. (From OE-Core rev: 39bfa0dd3237cbca47e7fca1075d521f9d073f25) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14go: Enable on muslKhem Raj
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-10go: Add recipes for golang compilers and toolsKhem Raj
* 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>