[meta-virtualization] [PATCH][meta-cloud-services] consul: add INSANE_SKIP for textrel

changqing.li at windriver.com changqing.li at windriver.com
Tue Oct 9 23:59:09 PDT 2018


From: Changqing Li <changqing.li at windriver.com>

1. for i586, bitbake consul will have QA error of textrel.
   consul-git-r0 do_package_qa: QA Issue: ELF binary i
   'work/i586-wrs-linux/consul/git-r0/packages-split/consul/usr/bin/consul'
   has relocations in .text [textrel]

   according to go doc:
   -buildmode=pie
   Build the listed main packages and everything they import into
   position independent executables (PIE). Packages not named
   main are ignored.

   checked use command "eu-findtextrel ./consul", functions not
   compiled with -fpic/-fPIC are from packages not named main, and
   also not imported into package main.

   so -buildmode=pie cannot reslove this problem. so refer commit
   b689c72a of oe-core, just skip it.

2. This problem is caused since security_flags.inc is used by default.
   so alternative work around is:
      SECURITY_CFLAGS_pn-consul = "${SECURITY_NOPIE_CFLAGS}"
      SECURITY_LDFLAGS_pn-consul = ""

Signed-off-by: Changqing Li <changqing.li at windriver.com>
---
 recipes-connectivity/consul/consul_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-connectivity/consul/consul_git.bb b/recipes-connectivity/consul/consul_git.bb
index a44e0b2..ee49c5e 100644
--- a/recipes-connectivity/consul/consul_git.bb
+++ b/recipes-connectivity/consul/consul_git.bb
@@ -23,3 +23,6 @@ do_install_append() {
 }
 
 FILES_${PN} += "${systemd_unitdir}/system"
+
+#for i586, executable consul contains textrel
+INSANE_SKIP_${PN} += "textrel"
-- 
2.7.4



More information about the meta-virtualization mailing list