diff options
-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 | } | ||