summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/goarch.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/goarch.bbclass')
-rw-r--r--meta/classes-recipe/goarch.bbclass29
1 files changed, 3 insertions, 26 deletions
diff --git a/meta/classes-recipe/goarch.bbclass b/meta/classes-recipe/goarch.bbclass
index 5fb6051bde..1ebe03864f 100644
--- a/meta/classes-recipe/goarch.bbclass
+++ b/meta/classes-recipe/goarch.bbclass
@@ -68,33 +68,10 @@ SECURITY_NOPIE_CFLAGS ??= ""
68CCACHE_DISABLE ?= "1" 68CCACHE_DISABLE ?= "1"
69 69
70def go_map_arch(a, d): 70def go_map_arch(a, d):
71 import re 71 arch = oe.go.map_arch(a)
72 if re.match('i.86', a): 72 if not arch:
73 return '386'
74 elif a == 'x86_64':
75 return 'amd64'
76 elif re.match('arm.*', a):
77 return 'arm'
78 elif re.match('aarch64.*', a):
79 return 'arm64'
80 elif re.match('mips64el.*', a):
81 return 'mips64le'
82 elif re.match('mips64.*', a):
83 return 'mips64'
84 elif a == 'mips':
85 return 'mips'
86 elif a == 'mipsel':
87 return 'mipsle'
88 elif re.match('p(pc|owerpc)(64le)', a):
89 return 'ppc64le'
90 elif re.match('p(pc|owerpc)(64)', a):
91 return 'ppc64'
92 elif a == 'riscv64':
93 return 'riscv64'
94 elif a == 'loongarch64':
95 return 'loong64'
96 else:
97 raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a) 73 raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
74 return arch
98 75
99def go_map_arm(a, d): 76def go_map_arm(a, d):
100 if a.startswith("arm"): 77 if a.startswith("arm"):