Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | require go-${PV}.inc |
| 2 | require go-target.inc |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 3 | |
| 4 | export GO_TARGET_INSTALL = "cmd" |
| 5 | export GO_FLAGS = "-a" |
| 6 | export CC_FOR_TARGET = "${CC}" |
| 7 | export CXX_FOR_TARGET = "${CXX}" |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame^] | 8 | export GOBUILDMODE="" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 9 | |
| 10 | do_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | |
Brad Bishop | a5c52ff | 2018-11-23 10:55:50 +1300 | [diff] [blame^] | 20 | # 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. |
| 23 | python() { |
| 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 | } |