summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-02-23 20:13:19 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-26 15:21:20 +0000
commitb1eea8178ae36ca82918f658b6bffd7da9fe7a1f (patch)
tree46c2333e262da85e269a9492387fcde53eeaccef /meta/recipes-devtools
parentcedb3aa8173a9443fec5adee8419d2f505bc304c (diff)
downloadpoky-b1eea8178ae36ca82918f658b6bffd7da9fe7a1f.tar.gz
go: Enable CGO and pie buildmode on rv64
go1.16 has added CGO support for riscv64 arch (From OE-Core rev: 8e078238312948e8c7b09c66ba7a186512e995d3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.16.bb1
-rw-r--r--meta/recipes-devtools/go/go_1.16.bb5
2 files changed, 2 insertions, 4 deletions
diff --git a/meta/recipes-devtools/go/go-runtime_1.16.bb b/meta/recipes-devtools/go/go-runtime_1.16.bb
index d6ddb31ed4..63464a1501 100644
--- a/meta/recipes-devtools/go/go-runtime_1.16.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.16.bb
@@ -1,4 +1,3 @@
1export CGO_ENABLED_riscv64 = ""
2require go-${PV}.inc 1require go-${PV}.inc
3require go-runtime.inc 2require go-runtime.inc
4 3
diff --git a/meta/recipes-devtools/go/go_1.16.bb b/meta/recipes-devtools/go/go_1.16.bb
index d4812c0f0a..4e9e0ebec8 100644
--- a/meta/recipes-devtools/go/go_1.16.bb
+++ b/meta/recipes-devtools/go/go_1.16.bb
@@ -4,15 +4,14 @@ require go-target.inc
4inherit linuxloader 4inherit linuxloader
5 5
6export GOBUILDMODE="" 6export GOBUILDMODE=""
7export CGO_ENABLED_riscv64 = ""
8export GO_LDSO = "${@get_linuxloader(d)}" 7export GO_LDSO = "${@get_linuxloader(d)}"
9export CC_FOR_TARGET = "gcc" 8export CC_FOR_TARGET = "gcc"
10export CXX_FOR_TARGET = "g++" 9export CXX_FOR_TARGET = "g++"
11 10
12# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its 11# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its
13# variants. 12# variants.
14python() { 13python() {
15 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True): 14 if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True):
16 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel") 15 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
17} 16}
18 17