mirror of
https://git.yoctoproject.org/poky
synced 2026-02-10 10:43:02 +01:00
Other spaces uses the Go architecture definitions as their own (for example, container arches are defined to be Go arches). To make it easier for other places to use this mapping, move the code that does the translation of OpenEmbedded arches to Go arches to a library. (From oe-core rev: 3e86f72fc2e1cc2e5ea4b4499722d736941167ce) This commit together with meta-virtualization commit 115f6367f37095415f289fb6981cda9608ac72ff broke meta-virtualization master used with meta-lts-mixins kirkstone/go which is our primary usecase for having kirkstone/go mixin layer Manually crafted since cherry-pick had too many conflicts: * different path to classes * additional architecture loongarch64 * different way how to import library (From OE-Core rev: 8726ae02d760270f9e7fe7ef5715d8f7553371ce) Signed-off-by: Peter Marko <peter.marko@siemens.com> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Cc: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
33 lines
720 B
Python
33 lines
720 B
Python
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
import re
|
|
|
|
def map_arch(a):
|
|
if re.match('i.86', a):
|
|
return '386'
|
|
elif a == 'x86_64':
|
|
return 'amd64'
|
|
elif re.match('arm.*', a):
|
|
return 'arm'
|
|
elif re.match('aarch64.*', a):
|
|
return 'arm64'
|
|
elif re.match('mips64el.*', a):
|
|
return 'mips64le'
|
|
elif re.match('mips64.*', a):
|
|
return 'mips64'
|
|
elif a == 'mips':
|
|
return 'mips'
|
|
elif a == 'mipsel':
|
|
return 'mipsle'
|
|
elif re.match('p(pc|owerpc)(64le)', a):
|
|
return 'ppc64le'
|
|
elif re.match('p(pc|owerpc)(64)', a):
|
|
return 'ppc64'
|
|
elif a == 'riscv64':
|
|
return 'riscv64'
|
|
return ''
|