[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 1/1] go.bbclass: Add -buildmode=pie for non mips arch
From:       Robert Yang <liezhi.yang () windriver ! com>
Date:       2018-09-29 9:44:46
Message-ID: 5262fed3fddeaa7b919a85237c2d76e9c8116260.1538214256.git.liezhi.yang () windriver ! com
[Download RAW message or body]

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@windriver.com>
---
 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')
+}
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic