summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-runtime.inc
AgeCommit message (Collapse)Author
11 daysgo: Drop the linkmode completelyJose Quaresma
This will make possible to restore the default dynamic linking globally which is what we had before the 1.20.X release. (From OE-Core rev: 6ad90fc2fc49c4199a59dfb1c1d81a7ba184a522) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-02gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie
handling There is little point in having "crosssdk" suffex added to the virtual provider within gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. This also allows removal of some of the MLPREFIX usage since again, the triplet also covers this. (From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-30go: Fix reproducibility failuresRichard Purdie
We're seeing "cmd" static libs being sometimes present and sometimes not. The issue depends whether BUILD == TARGET so they're present for qemux86-64 on x86-64 hosts but not for qemux86-64 on an aarch64 system. Add an extra deletion to make the files consistent between the different hosts. (From OE-Core rev: 6e652835814c389a826ad2d262ee26c14dfb48b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
2022-01-14go: fix building without SECURITY_LDFLAGSDmitry Baryshkov
Commit 9985b17a30bb ("go: correctly set debug-prefix-map and build directory") has changed CGO_LDFLAGS to the manually crafted version of LDFLAGS to strip out DEBUG_PREFIX_MAP contents. However this manually crafted version includes ${SECURITY_LDFLAGS}. If security_flags.inc is not included, the variable is not defined, thus CGO_LDFLAGS will include the '${SECURITY_LDFLAGS}' literally. When building the recipe, the build would break with the follwing message: aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or directory So, instead of manually specifying variable contents, perform the expected action: filter offending arguments out of LDFLAGS. Cc: Alexander Kanavin <alex.kanavin@gmail.com> (From OE-Core rev: e7d2d68679c1980d9e889d96c3eab49589f5b832) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-05go: correctly set debug-prefix-map and build directoryAlexander Kanavin
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>
2021-08-02Convert to new override syntaxRichard Purdie
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>
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-08-14go-runtime: remove conflict files from -dev packagesChangqing Li
fix below error: file /usr/lib64/go/src/cmd/cgo/zdefaultcc.go conflicts between attempted installs of go-dev-1.12.6-r0.core2_64 and go-runtime-dev-1.12.6-r0.core2_64 file /usr/lib64/go/src/cmd/go/internal/cfg/zdefaultcc.go conflicts between attempted installs of go-dev-1.12.6-r0.core2_64 and go-runtime-dev-1.12.6-r0.core2_64 these 2 files existed in both go-dev and go-runtime-dev remove it from go-runtime-dev to fix the problem (From OE-Core rev: 60dcae509a210f2cae8eda525a1b006663aef9bf) Signed-off-by: Changqing Li <changqing.li@windriver.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>
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-runtime: remove unneeded nativesdk override, rename variableMatt Madison
since GO_LDFLAGS is also used by the dist tool, and it's confusing to use a variable with the same name (but not exported, so unused by make.bash/dist). (From OE-Core rev: b5ee166307ea095c77237e06744dff6810800bad) 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: 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-10-07go-runtime: prevent host leakage into target objectsMatt Madison
When building for a target whose architecture matches the build host's, the second pass through make.bash to build the shareable runtime would also overwrite the target's static cgo library with host-compatibile binaries. Fix this by running the host-side build once and target-only passes of make.bash twice, for static and shareable. This ensures that what gets installed is target-compatible. Also fix an issue with x86-64 targets running MUSL by removing the pre-built (for glibc) objects for the race detector runtime before building. [YOCTO #12136] (From OE-Core rev: 070f4af529c84a3c8c0b1ffc7b138bdd9e8439b7) 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-09-21go: fix linking issues for nativesdk buildsMatt Madison
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-14go-runtime: build the Go runtime as a shared libraryMatt Madison
If the target architecture supports, it build the Go runtime as a shared library in addition to building the static libraries. (From OE-Core rev: f562b5e91c12ab67140de537ea269fe1ac85a764) 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-14go-runtime: extend to nativesdk buildsMatt Madison
Missed this when addding SDK support. (From OE-Core rev: ee80c21d12d12dc262d4b02aaaef3b57253b25df) 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>