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:21:20 +0000 |
| commit | b1eea8178ae36ca82918f658b6bffd7da9fe7a1f (patch) | |
| tree | 46c2333e262da85e269a9492387fcde53eeaccef /meta/classes | |
| parent | cedb3aa8173a9443fec5adee8419d2f505bc304c (diff) | |
| download | poky-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/classes')
| -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}" | |||
| 54 | export GOTOOLDIR | 54 | export GOTOOLDIR |
| 55 | 55 | ||
| 56 | export CGO_ENABLED ?= "1" | 56 | export CGO_ENABLED ?= "1" |
| 57 | export CGO_ENABLED_riscv64 = "0" | ||
| 58 | export CGO_CFLAGS ?= "${CFLAGS}" | 57 | export CGO_CFLAGS ?= "${CFLAGS}" |
| 59 | export CGO_CPPFLAGS ?= "${CPPFLAGS}" | 58 | export CGO_CPPFLAGS ?= "${CPPFLAGS}" |
| 60 | export CGO_CXXFLAGS ?= "${CXXFLAGS}" | 59 | export CGO_CXXFLAGS ?= "${CXXFLAGS}" |
| @@ -147,10 +146,10 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg" | |||
| 147 | INSANE_SKIP_${PN} += "ldflags" | 146 | INSANE_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. |
| 152 | python() { | 151 | python() { |
| 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') |
