diff options
Diffstat (limited to 'poky/meta/classes/go.bbclass')
-rw-r--r-- | poky/meta/classes/go.bbclass | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass index 77ec98dd5..0dd0c5f1d 100644 --- a/poky/meta/classes/go.bbclass +++ b/poky/meta/classes/go.bbclass @@ -2,8 +2,8 @@ inherit goarch GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" -GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" -GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go" +GOROOT:class-native = "${STAGING_LIBDIR_NATIVE}/go" +GOROOT:class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go" GOROOT = "${STAGING_LIBDIR}/go" export GOROOT export GOROOT_FINAL = "${libdir}/go" @@ -15,42 +15,42 @@ export GOHOSTARCH="${BUILD_GOARCH}" export GOHOSTOS="${BUILD_GOOS}" GOARM[export] = "0" -GOARM_arm_class-target = "${TARGET_GOARM}" -GOARM_arm_class-target[export] = "1" +GOARM:arm:class-target = "${TARGET_GOARM}" +GOARM:arm:class-target[export] = "1" GO386[export] = "0" -GO386_x86_class-target = "${TARGET_GO386}" -GO386_x86_class-target[export] = "1" +GO386:x86:class-target = "${TARGET_GO386}" +GO386:x86:class-target[export] = "1" GOMIPS[export] = "0" -GOMIPS_mips_class-target = "${TARGET_GOMIPS}" -GOMIPS_mips_class-target[export] = "1" +GOMIPS:mips:class-target = "${TARGET_GOMIPS}" +GOMIPS:mips:class-target[export] = "1" -DEPENDS_GOLANG_class-target = "virtual/${TUNE_PKGARCH}-go virtual/${TARGET_PREFIX}go-runtime" -DEPENDS_GOLANG_class-native = "go-native" -DEPENDS_GOLANG_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk virtual/${TARGET_PREFIX}go-runtime" +DEPENDS_GOLANG:class-target = "virtual/${TUNE_PKGARCH}-go virtual/${TARGET_PREFIX}go-runtime" +DEPENDS_GOLANG:class-native = "go-native" +DEPENDS_GOLANG:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk virtual/${TARGET_PREFIX}go-runtime" -DEPENDS_append = " ${DEPENDS_GOLANG}" +DEPENDS:append = " ${DEPENDS_GOLANG}" GO_LINKSHARED ?= "${@'-linkshared' if d.getVar('GO_DYNLINK') else ''}" GO_RPATH_LINK = "${@'-Wl,-rpath-link=${STAGING_DIR_TARGET}${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" GO_RPATH = "${@'-r ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" -GO_RPATH_class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" -GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" +GO_RPATH:class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" +GO_RPATH_LINK:class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" GO_LINKMODE ?= "" -GO_LINKMODE_class-nativesdk = "--linkmode=external" -GO_LINKMODE_class-native = "--linkmode=external" +GO_LINKMODE:class-nativesdk = "--linkmode=external" +GO_LINKMODE:class-native = "--linkmode=external" GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" export GOPTESTFLAGS ?= "" -GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " +GOBUILDFLAGS:prepend:task-compile = "${GO_PARALLEL_BUILD} " export GO = "${HOST_PREFIX}go" GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}" -GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" +GOTOOLDIR:class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" export GOTOOLDIR export CGO_ENABLED ?= "1" @@ -140,17 +140,17 @@ go_stage_testdata() { EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install -FILES_${PN}-dev = "${libdir}/go/src" -FILES_${PN}-staticdev = "${libdir}/go/pkg" +FILES:${PN}-dev = "${libdir}/go/src" +FILES:${PN}-staticdev = "${libdir}/go/pkg" -INSANE_SKIP_${PN} += "ldflags" +INSANE_SKIP:${PN} += "ldflags" # Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips # doesn't support -buildmode=pie, so skip the QA checking for mips/rv32 and its # variants. python() { if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): - d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") + d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel") else: d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') } |