summaryrefslogtreecommitdiffstats
path: root/meta/classes/go.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-28go.bbclass: fix path to linker in native Go buildsDmitry Baryshkov
Building native Go tools results in the tool pointing to the wrong location of dynamic linker (see below). The linker is looked up in the temporary dir, which can be removed if rm_work is inherited. This results in being unable to execute the program with the 'No such file or directory' error. Override linker specificiation for native recipes (and let Go build environment to pick up a correct one on it's own). The error is observed in case the distro doesn't use uninative.bbclass. If uninative.bbclass is used, the binary will be patched automatically to use the uninative loader instead of the system one. Without this patch: $ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffe945ec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3a7490e000) /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/x86_64-linux/go-md2man-native/1.0.10+gitAUTOINC+f79a8a8ca6-r0/recipe-sysroot-native/usr/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f3a74d13000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help -bash: tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: No such file or directory With the patch $ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffd19dbf000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d44181000) /lib64/ld-linux-x86-64.so.2 (0x00007f2d44586000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help Usage of tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: -in string Path to file to be processed (default: stdin) -out string Path to output processed file (default: stdout) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-26go.bbclass: disable the use of the default configuration fileChen Qi
We need to disable the use the default configuration file. This is to ensure that user settings do not mess things up when building go recipes. For example, if I set 'GOBIN=./relative/path' in $HOME/.config/go/env, then go-runtime fails to build with error like below: cannot install, GOBIN must be an absolute path According to `go help environment', """ Setting GOENV=off in the environment disables the use of the default configuration file. """ We can explicitly disable the configuration file by setting GOENV to off. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19go: Always pass interpreter to linkerJoerg Vehlow
When gos internal linker is used, it uses hardcoded paths to the interpreter (dynamic linker). For x86_64 this hardcoded path is /lib64/ld-linux-x86-64.so.2, but yocto's default dynamic linker path is /lib64/ld-linux-x86-64.so.2. Most of the time, the internal linker is not used and binutils linker sets the correct path, but sometimes the internal linker is used and the resulting binary will not work on x86_64. To ensure the path is always correct, pass it to the linker. Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> 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'. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-05go: log build id computationsAlexander Kanavin
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. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-28go.bbclass: Allow adding parameters to go ldflagsAhmed Hossam
Currently, there is no clean way to pass extra parameters to the go tool link, which is passed by the go build ldflags flag, the append needs to happen inside the quotes of the ldflags parameter See [YOCTO #14554]. Add a variable to allow adding extra parameters to -ldflags in the GO_LDFLAGS variable, one of the main usecases is setting the application version. For example, adding to the recipe something like GO_EXTRA_LDFLAGS="-X main.Version=v1.0.0" or GO_EXTRA_LDFLAGS="-X main.Version=${PV}" Signed-off-by: Ahmed Hossam <Ahmed.Hossam@opensynergy.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2021-07-30Convert 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 "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26go: Enable CGO and pie buildmode on rv64Khem Raj
go1.16 has added CGO support for riscv64 arch Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-10go.bbclass: don't stage test data with sources of dependenciesThomas Perrot
As for the sources the dependencies contain test data, ELF files and other binaries which aren't necessary for building and which lead to unnecessary QA warnings. Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18go.bbclass: Use external linker for native packagesKhem Raj
go 1.15 has reworked internal linker, which has resulted in regressions in OE where native binaries generated using internal linker in some cases result in corruption during populate_sysroot e.g. glide-native crashing when used after relocation. This improved reliability of native binaries working especially when they use cgo or pie build modes Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio.salvador@ossystems.com.br> Cc: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-26go.bbclass: Add `-trimpath` to default build flagsOtavio Salvador
The `-trimpath` option is important for reproducible builds so full build paths and module paths are not embedded. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27Disable CGO on riscv64Khem Raj
Its not supported yet Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27go.bbclass: Disable PIE on riscvKhem Raj
Its not _yet_ supported for riscv Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03classes/lib: Remove bb.build.FuncFailedRichard Purdie
Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-09go.bbclass: separate the ptest logic to go-ptest classMingli Yu
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. Signed-off-by: Mingli Yu <mingli.yu@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. Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08go: Exclude vcs files when installing depsAlex Kiernan
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 Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12go.bbclass: Remove unused overrideRichard Purdie
The x86 override means the i586 one isn't necessary. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10go.bbclass: Export more GO* environment variablesMark Asselstine
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. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06go: 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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-01go.bbclass: Add -buildmode=pie for non mips archRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06go.bbclass, goarch.bbclass: update SECURITY_CFLAGSMatt Madison
With go1.10 the NOPIE flags are only required for MIPS target builds, and are now incompatible for the other architectures. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06go.bbclass: ptest cleanup and improvementsMatt Madison
* 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. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06go.bbclass: don't stage test data with sourcesMatt Madison
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. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06go.bbclass: remove debug-related commandsMatt Madison
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. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06go.bbclass: rename GO_TMPDIR -> GOTMPDIRMatt Madison
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. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-16utils.py: add parallel make helpersJoshua Watt
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. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25go: disable PIE flags for cgoMatt Madison
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. 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-21go.bbclass: set TMPDIR during compilationMatt Madison
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. 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>
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. 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>
2017-09-13go.bbclass: Add ptest supportOtavio Salvador
This adds ptest support for Go packages so its unittest content is packaged and integrated onto the test framework. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13go.bbclass: Add "ldflags" to QA skip listOtavio Salvador
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. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13go.bbclass: add support linking against shared runtimeMatt Madison
For architectures that support it, use the -linkshared build option to build packages against the shared Go runtime. 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.bbclass: enable nativesdk builds for Go packagesMatt Madison
Adding the necessary overrides for nativesdk builds. 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.bbclass: clean up CGO_xxx settingsMatt Madison
* 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 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.bbclass: remove some xxx_FINAL variablesMatt Madison
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. 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.bbclass: remove GO_GCFLAGS nad GO_LDFLAGSMatt Madison
These variables are not used anywhere. 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. 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-11go.bbclass: add GO_INSTALL_FILTEROUT variableMatt Madison
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. 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-11go.bbclass: add do_unpack function to handle common casesMatt Madison
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. 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-11go.bbclass: separate ${S} and ${B}Matt Madison
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. 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-11go.bbclass: Use an auxiliary variable to add the build dependenciesOtavio Salvador
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 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: exported function cleanupMatt Madison
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. 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-11go.bbclass: Enable parallel buildOtavio Salvador
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 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: Use a global Go build flagsOtavio Salvador
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 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>