summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-common.inc
Commit message (Collapse)AuthorAgeFilesLines
* go: set vendor in CVE_PRODUCTRoss Burton2023-12-131-1/+1
| | | | | | | | | | | | | | | It's not uncommon for specific third party modules to use "go" as the product[1]. However, the canonical CPE for the official Go language/runtime is always golang:go[2], so use that explicitly. [1] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-49292 [2] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-39320 (From OE-Core rev: fc3e9cce9e1a5aa5dc9a5ad4abdd4eb61f868d37) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: use go as CVE product for all golang recipe veriantsPeter Marko2023-03-141-0/+3
| | | | | | | | | | | | | | | | | All golang vulnerabilities are reported under product 'go'. By default there is no vulnerability reported for images with golang components because none of used golang packages have correct CVE product set: * go-binary-native * go-runtime * go-cross-* (From OE-Core rev: 09f3a27a809bbec9b08c4e4a2b846b68f386c35c) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: correctly set debug-prefix-map and build directoryAlexander Kanavin2022-01-051-1/+1
| | | | | | | | | | | | | | | | | Go has its own system for creating temporary build sub-directories with randomized names, and setting up debug-prefix-map on the fly to prevent those directories leaking into target binaries. OE's own settings were clashing with it, so this change carefully avoids the two stepping on each other. Additionally, the top level build directory cannot be named 'go-something'. (From OE-Core rev: 9985b17a30bb9b9f1bc82a44662687db5cead66e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: log build id computationsAlexander Kanavin2022-01-051-0/+2
| | | | | | | | | | | | | | | go writes build-specific ids into binaries it produces and has a custom system for calculating them from file hashes, environment variables and other inputs (not that dissimilar to sstate cache, actually). This can go wrong :) in various ways (for purposes of reproducibility in particular), so this enables useful logs to see what happens and why. (From OE-Core rev: a587be1d18fc55fe57d1aa5aa7c9e26af887109e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-1/+1
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "go: Use dl.google.com for SRC_URI"Alexander Kanavin2021-05-121-1/+1
| | | | | | | | | | | This reverts commit 4118415d4bc6243c98a1440195826be7cbad24f1. This was found to be unnecessary, and broke upstream version checks. (From OE-Core rev: cee436d1eb94663f3604c80b6ad87292f6901498) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: Use dl.google.com for SRC_URIKhem Raj2021-04-231-1/+1
| | | | | | | | | golang.org/dl is resolving to this anyway (From OE-Core rev: 8470e38ac1d9f9bb6d8a4ee43724af452d080057) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: update SRC_URI to use https protocolwangmy2021-04-181-1/+1
| | | | | | | (From OE-Core rev: 2a1eb731ed3bcb049192550e362b771c3a9ea6eb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "go: Reset unneeded GOARCH variables for native recipe"Khem Raj2019-12-151-10/+0
| | | | | | | | | This reverts commit 4825eede606b075d0d529b38d6162999f1dec506. (From OE-Core rev: 18b90967bd367263280ec871be84e67e3eed11fa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: Reset unneeded GOARCH variables for native recipeKhem Raj2019-12-061-0/+10
| | | | | | | | | | | | | | | | | These variables depend on TUNE_FEATURES variable and that creeps into dependencies for native as well as a result, which means go-native gets recompiled everytime machine/arch is changed. Fixes sstate differences found e.g. basehash changed from 600fb6be571fa4853232a7fed78945ee19b324e54b1b94cff93ef472b6290103 to 994de861190a56064d3e186d9c411152127e230bf2f77b17e59b2c5932a41249 List of dependencies for variable TUNE_FEATURES changed from '{'TUNE_FEATURES_tune-core2-32', 'DEFAULTTUNE'}' to '{'TUNE_FEATURES_tune-armv7vethf-neon', 'DEFAULTTUNE'}' changed items: {'TUNE_FEATURES_tune-core2-32', 'TUNE_FEATURES_tune-armv7vethf-neon'} (From OE-Core rev: 4825eede606b075d0d529b38d6162999f1dec506) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: Extract common environment setup.Alex Kube2019-11-251-0/+10
| | | | | | | | | | | | 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>
* go: Add recipes for 1.12 release and make it defaultKhem Raj2019-03-091-1/+0
| | | | | | | | | | - 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>
* go: move common settings to go-common.incMatt Madison2018-03-061-0/+4
| | | | | | | | | | | | | 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>
* go: update go 1.9 -> go 1.10Matt Madison2018-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* go: fix upstream version checkAlexander Kanavin2018-02-161-0/+1
| | | | | | | | (From OE-Core rev: 9a91e5ce7d41ce11571853158ae4358c0da7b51e) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: ensure use of BUILD_CC when building bootstrap toolsMatt Madison2017-12-021-0/+4
| | | | | | | | | | | | | | | | | For cross-canadian builds, we were accidentally using the crosssdk C compiler when building the Go compiler bootstrap. Add a patch to the make script to let us use BUILD_CC, and prepend do_compile to set it in the local environment to ensure that the trailing blank gets stripped, since that confuses Go. [YOCTO #12341] (From OE-Core rev: 0dbb860924fc157880b52d8e08bad3c6c6b019b8) 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>
* go-native: remove dependency on go-bootstrap-nativeMatt Madison2017-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | The go1.4 toolchain is only required for bootstrapping go-native, and should not be used for anything else, so build it as part of the go-native build. This way, we don't have to carry around its built artifacts in the native sysroot. The go-cross and target toolchains can then just depend on go-native, using that for their 'bootstrap' toolchain. Also removed some unnecessary package-related noexec settings, since native recipes inherit nopackages. (From OE-Core rev: 9dc9d457fb9a456bc18c7789b91f40e1f6a999fe) 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>
* go: Add recipes for golang compilers and toolsKhem Raj2017-03-101-0/+22
* 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>