merged to master. Bruce
On Sun, Jan 1, 2017 at 5:21 PM, Paul Barker <[email protected]> wrote: > Building any recipe for a mips-based machine like arduino-yun currently > leads > to errors in go_map_arch(). Instead, errors should only be raised if a > recipe > which uses golang is built. This is achieved using the same error handling > seen > in recipes-extended/xen. > > Signed-off-by: Paul Barker <[email protected]> > --- > classes/go-osarchmap.bbclass | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/classes/go-osarchmap.bbclass b/classes/go-osarchmap.bbclass > index 4e00c7b..303b30b 100644 > --- a/classes/go-osarchmap.bbclass > +++ b/classes/go-osarchmap.bbclass > @@ -11,6 +11,11 @@ TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH', > True), d.getVar('TUNE_FEAT > TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" > GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}',' > bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}" > > +python() { > + if d.getVar('TARGET_GOARCH') == 'INVALID': > + raise bb.parse.SkipPackage('Cannot map `%s` to a go architecture' > % d.getVar('TARGET_ARCH', True)) > +} > + > def go_map_arch(a, d): > import re > if re.match('i.86', a): > @@ -24,7 +29,7 @@ def go_map_arch(a, d): > elif re.match('p(pc|owerpc)(|64)', a): > return 'powerpc' > else: > - bb.error("cannot map '%s' to a Go architecture" % a) > + return 'INVALID' > > def go_map_arm(a, f, d): > import re > -- > 2.1.4 > > -- > _______________________________________________ > meta-virtualization mailing list > [email protected] > https://lists.yoctoproject.org/listinfo/meta-virtualization > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
-- _______________________________________________ meta-virtualization mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-virtualization
