summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go_1.14.bb
blob: c17527998b3289d3d49df9a95500ad6029a398b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require go-${PV}.inc
require go-target.inc

export GOBUILDMODE=""
export CGO_ENABLED_riscv64 = ""
# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but
# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
# for windows/mips/riscv and their variants.
python() {
    if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True):
        d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
    else:
        d.setVar('GOBUILDMODE', 'pie')
}