diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-02-23 20:13:19 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-26 15:16:56 +0000 |
commit | 8e078238312948e8c7b09c66ba7a186512e995d3 (patch) | |
tree | 75c0935c06e27ed5b36f8c1a7289f5144f51d598 /meta/classes/go.bbclass | |
parent | 5c41c6ed4e2e70d18b32c460b8c8e1aadd54584f (diff) | |
download | openembedded-core-contrib-8e078238312948e8c7b09c66ba7a186512e995d3.tar.gz |
go: Enable CGO and pie buildmode on rv64
go1.16 has added CGO support for riscv64 arch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 5 |
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}" export GOTOOLDIR export CGO_ENABLED ?= "1" -export CGO_ENABLED_riscv64 = "0" export CGO_CFLAGS ?= "${CFLAGS}" export CGO_CPPFLAGS ?= "${CPPFLAGS}" export CGO_CXXFLAGS ?= "${CXXFLAGS}" @@ -147,10 +146,10 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg" 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 and its +# 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 'riscv' in d.getVar('TARGET_ARCH'): + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") else: d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') |