blob: c23ea0c1aef50e52a48a2fe54204c6c744bd64d6 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001require go-${PV}.inc
2require go-target.inc
Brad Bishop316dfdd2018-06-25 12:45:53 -04003
4export GO_TARGET_INSTALL = "cmd"
5export GO_FLAGS = "-a"
6export CC_FOR_TARGET = "${CC}"
7export CXX_FOR_TARGET = "${CXX}"
Brad Bishopa5c52ff2018-11-23 10:55:50 +13008export GOBUILDMODE=""
Brad Bishop316dfdd2018-06-25 12:45:53 -04009
10do_compile() {
11 export GOBIN="${B}/bin"
12 export TMPDIR="$GOTMPDIR"
13 export CC=$BUILD_CC
14
15 cd src
16 ./make.bash
17 cd ${B}
18}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019
Brad Bishopa5c52ff2018-11-23 10:55:50 +130020# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips
21# doesn't support -buildmode=pie, so skip the QA checking for mips and its
22# variants.
23python() {
24 if 'mips' in d.getVar('TARGET_ARCH'):
25 d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
26 else:
27 d.setVar('GOBUILDMODE', 'pie')
28}