diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2018-09-29 17:44:46 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-01 13:04:50 +0100 |
commit | bdb49647874e18e7d60374b8973a307551b36a14 (patch) | |
tree | c9a09a6b46a691b1528a2bfef83b1b3b8e1c6adc /meta | |
parent | 4771a7c2ed3e7375c4733210e3cae4c8210044e1 (diff) | |
download | poky-bdb49647874e18e7d60374b8973a307551b36a14.tar.gz |
go.bbclass: Add -buildmode=pie for non mips arch
Fixed QA issue like:
WARNING: runc-docker do_package_qa: QA Issue: ELF binary '/path/to/runc-docker/usr/bin/runc' has relocations in .text [textrel]
(From OE-Core rev: 8dcd4e6e791c3a8b8bf5e69dca9bb9c887231d69)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/go.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index d33d83ea7f..167d02e3fa 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -179,3 +179,13 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg" | |||
179 | 179 | ||
180 | INSANE_SKIP_${PN} += "ldflags" | 180 | INSANE_SKIP_${PN} += "ldflags" |
181 | INSANE_SKIP_${PN}-ptest += "ldflags" | 181 | INSANE_SKIP_${PN}-ptest += "ldflags" |
182 | |||
183 | # Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips | ||
184 | # doesn't support -buildmode=pie, so skip the QA checking for mips and its | ||
185 | # variants. | ||
186 | python() { | ||
187 | if 'mips' in d.getVar('TARGET_ARCH'): | ||
188 | d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") | ||
189 | else: | ||
190 | d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') | ||
191 | } | ||