diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/goarch.bbclass')
-rw-r--r-- | import-layers/yocto-poky/meta/classes/goarch.bbclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/import-layers/yocto-poky/meta/classes/goarch.bbclass b/import-layers/yocto-poky/meta/classes/goarch.bbclass index 663c9ffc3..f54c5169e 100644 --- a/import-layers/yocto-poky/meta/classes/goarch.bbclass +++ b/import-layers/yocto-poky/meta/classes/goarch.bbclass @@ -5,11 +5,13 @@ HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}" HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}" HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" +HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}" TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}" TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}" TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" +TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}" @@ -22,6 +24,7 @@ GO_DYNLINK_x86 = "1" GO_DYNLINK_x86-64 = "1" GO_DYNLINK_powerpc64 = "1" GO_DYNLINK_class-native = "" +GO_DYNLINK_class-nativesdk = "" # define here because everybody inherits this class # @@ -32,6 +35,8 @@ COMPATIBLE_HOST_powerpc64 = "null" COMPATIBLE_HOST_mipsarchn32 = "null" ARM_INSTRUCTION_SET = "arm" TUNE_CCARGS_remove = "-march=mips32r2" +SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}" +SECURITY_NOPIE_CFLAGS ??= "" def go_map_arch(a, d): import re @@ -56,7 +61,7 @@ def go_map_arch(a, d): elif re.match('p(pc|owerpc)(64el)', a): return 'ppc64le' else: - raise bb.parse.SkipPackage("Unsupported CPU architecture: %s" % a) + raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a) def go_map_arm(a, f, d): import re @@ -78,6 +83,15 @@ def go_map_386(a, f, d): return '387' return '' +def go_map_mips(a, f, d): + import re + if a == 'mips' or a == 'mipsel': + if 'fpu-hard' in f: + return 'hardfloat' + else: + return 'softfloat' + return '' + def go_map_os(o, d): if o.startswith('linux'): return 'linux' |