[meta-virtualization] [PATCH 1/2] go-osarchmap: Skip golang recipes for unsupported architectures
Bruce Ashfield
bruce.ashfield at gmail.com
Tue Jan 3 07:29:47 PST 2017
merged to master.
Bruce
On Sun, Jan 1, 2017 at 5:21 PM, Paul Barker <paul at paulbarker.me.uk> 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 <paul at paulbarker.me.uk>
> ---
> 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
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20170103/52ab8c19/attachment.html>
More information about the meta-virtualization
mailing list