[oe-commits] [openembedded-core] 15/15: go.bbclass: Add -buildmode=pie for non mips arch

git at git.openembedded.org git at git.openembedded.org
Sat Sep 29 14:20:07 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 35728167eec79d24e582ff8aea0aac9378e4761b
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Sat Sep 29 17:44:46 2018 +0800

    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]
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/go.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index d33d83e..167d02e 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -179,3 +179,13 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
 
 INSANE_SKIP_${PN} += "ldflags"
 INSANE_SKIP_${PN}-ptest += "ldflags"
+
+# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
+# doesn't support -buildmode=pie, so skip the QA checking for mips and its
+# variants.
+python() {
+    if 'mips' in d.getVar('TARGET_ARCH'):
+        d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
+    else:
+        d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list