diff options
| -rw-r--r-- | meta/classes/go.bbclass | 5 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go-runtime_1.16.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/go/go_1.16.bb | 5 |
3 files changed, 4 insertions, 7 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') |
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 @@ | |||
| 1 | export CGO_ENABLED_riscv64 = "" | ||
| 2 | require go-${PV}.inc | 1 | require go-${PV}.inc |
| 3 | require go-runtime.inc | 2 | require 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 | |||
| 4 | inherit linuxloader | 4 | inherit linuxloader |
| 5 | 5 | ||
| 6 | export GOBUILDMODE="" | 6 | export GOBUILDMODE="" |
| 7 | export CGO_ENABLED_riscv64 = "" | ||
| 8 | export GO_LDSO = "${@get_linuxloader(d)}" | 7 | export GO_LDSO = "${@get_linuxloader(d)}" |
| 9 | export CC_FOR_TARGET = "gcc" | 8 | export CC_FOR_TARGET = "gcc" |
| 10 | export CXX_FOR_TARGET = "g++" | 9 | export 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. |
| 14 | python() { | 13 | python() { |
| 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 | ||
