summaryrefslogtreecommitdiffstats
path: root/meta/classes/go.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r--meta/classes/go.bbclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index fa147892b0..77ec98dd51 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -54,7 +54,6 @@ GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
54export GOTOOLDIR 54export GOTOOLDIR
55 55
56export CGO_ENABLED ?= "1" 56export CGO_ENABLED ?= "1"
57export CGO_ENABLED_riscv64 = "0"
58export CGO_CFLAGS ?= "${CFLAGS}" 57export CGO_CFLAGS ?= "${CFLAGS}"
59export CGO_CPPFLAGS ?= "${CPPFLAGS}" 58export CGO_CPPFLAGS ?= "${CPPFLAGS}"
60export CGO_CXXFLAGS ?= "${CXXFLAGS}" 59export CGO_CXXFLAGS ?= "${CXXFLAGS}"
@@ -147,10 +146,10 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
147INSANE_SKIP_${PN} += "ldflags" 146INSANE_SKIP_${PN} += "ldflags"
148 147
149# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips 148# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
150# doesn't support -buildmode=pie, so skip the QA checking for mips and its 149# doesn't support -buildmode=pie, so skip the QA checking for mips/rv32 and its
151# variants. 150# variants.
152python() { 151python() {
153 if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH'): 152 if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'):
154 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") 153 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
155 else: 154 else:
156 d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') 155 d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')