summaryrefslogtreecommitdiffstats
path: root/meta/classes/goarch.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* goarch.bbclass: Define HOST_GO386 and TARGET_GO386Paul Barker2017-10-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | These variables are used to control the floating-point instructions emitted by the go compiler for x86 architectures. The default is '387' which disables the use of sse/sse2 instructions and is safe to use on all x86 processors from the i486 onwards. If TUNE_FEATURES contains a feature set which is known to support sse/sse2 instructions then they are set to 'sse2' to enable the use of these instructions. This is suitable for most processors from Pentium 4 onwards. Only the 'core2' and 'corei7' TUNE_FEATURES are defined in the oe-core layer and are known to support ss2 instructions. Other layers may introduce additional tunings which support sse2 instructions and for these layers, TARGET_GO386 or go_map_386 should be overridden as needed. (From OE-Core rev: 7e96cf3c9850dc34d53af73a9ac22b1624994484) 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>
* goarch.bbclass: rework mips architecture checksMatt Madison2017-10-071-10/+7
| | | | | | | | | | | | | | | Remove the TUNE_FEATURES references from go_map_arch, to avoid an unwanted variable dependency. Direct comparisons of the architecture name are sufficient for covering what Go currently supports, and using TUNE_CCARGS_remove adequately handles the conflict with the cgo-supplied flags for mips. (From OE-Core rev: 1bc4c1d880096083d1891a74024fb225a6340b9b) 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>
* goarch.bbclass: fixups for Go mips32 supportMatt Madison2017-09-261-4/+8
| | | | | | | | | | | | | | | | | | | | | * Fix the regular expression in the mips test * Flag as incompatible any mips32 tunes for n32 ABI or soft-float, as go does not support them. * Replace mips32r2 tune with mips32r1. Go only supports mips32r1, which is a strict subset of r2. Adjusting this tune is not ideal, but is hopefully a temporary measure until more complete mips32 ISA coverage arrives upstream. [YOCTO #12108] (From OE-Core rev: bdd20c296048937737da0f10bd1a3b63843c5bf4) 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>
* goarch.bbclass: set ARM_INSTRUCTION_SET to "arm"Matt Madison2017-09-141-0/+1
| | | | | | | | | | | Go does not play well with thumb, so ensure that the toolchain and any packages use arm, not thumb, instructions. (From OE-Core rev: 24da8c321831dcc5de00d65d6c5613efee109b57) 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>
* goarch.bbclass: identify archs with Go dynamic linking supportMatt Madison2017-09-141-0/+10
| | | | | | | | | | | | Go only supports shared libraries for some architectures, so add a variable for use elsewhere that gets a non-null value only for those architectures. (From OE-Core rev: 2275712df152b73ce49b36bdf9f8d744c68c9c50) 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>
* goarch.bbclass: Add support for ARMv5Otavio Salvador2017-09-111-0/+2
| | | | | | | | | | | | | | This adds support to return the proper ARMv5 format. 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: e242e7c3617ded87582c5d384b15027498b0c1a4) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Replace logic for setting GOARMWill Newton2017-09-111-2/+5
| | | | | | | | | | | | | | The previous logic applied a regex to TUNE_FEATURES which could set the GOARM value to 7 incorrectly, for example when dealing with an arm1176 core. Simplify to check for the presence of "armv7" instead. At the same time add a check for "armv6" and set GOARM to 6 in that case. (From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d) Signed-off-by: Will Newton <willn@resin.io> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Stop passing True as second argument of d.getVarOtavio Salvador2017-09-111-9/+9
| | | | | | | | | | The d.getVar has the second argument as True by default, avoid passing it here. (From OE-Core rev: 1a5026db41929d42bece22bd0ae60c13219a98f5) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch: Disable build for muslx32sweeaun2017-08-181-0/+1
| | | | | | | | | Disable build for muslx32. (From OE-Core rev: 7f6e47b0d8aec9cb22db50ccb40ebb01677f01ea) Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: centralize definition of COMPATIBLE_HOSTJoe Slater2017-07-271-0/+6
| | | | | | | | | 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>
* go: Add recipes for golang compilers and toolsKhem Raj2017-03-101-0/+50
* 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>