From: Holger Freyther <holger+oe@freyther.de>
To: openembedded-devel@lists.openembedded.org
Subject: RPATH in many modules
Date: Sat, 02 Oct 2010 19:39:12 +0800 [thread overview]
Message-ID: <4CA719E0.7050409@freyther.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
Hi all,
today I wanted to make the generated toolchain free of RPATH and I was a bit
surprised to see that even the target libraries contain the rpath and that it
is not caught by insane.bbclass.
I have added a more strict check to insane.bbclass to uncover the issue and I
am fighting neon and its manual libtool usage right now... it might be just
easier to use chrpath to fix the resulting libraries.
any opinion?
[-- Attachment #2: 0001-insane.bbclass-Check-for-RPATH-to-the-sysroot-and-co.patch --]
[-- Type: text/x-patch, Size: 1396 bytes --]
From 18a9dbf4d6925a789e5ecf2852e094c0b1d851fe Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <zecke@selfish.org>
Date: Sat, 2 Oct 2010 17:14:33 +0800
Subject: [PATCH] insane.bbclass: Check for RPATH to the sysroot and complain
For non-native packages having an rpath to the sysroot is
considered harmful and needs to be fixed. This uncovered
issues in neon and other packages.
---
classes/insane.bbclass | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 5afa63c..0515158 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -168,10 +168,13 @@ def package_qa_check_rpath(file,name,d, elf):
if not bad_dir in bb.data.getVar('WORKDIR', d, True):
bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")
+ sysroot = bb.data.getVar('STAGING_DIR_HOST', d, True)
+ native = bb.data.inherits_class('native', d)
+
output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file))
txt = output.readline().split()
for line in txt:
- if bad_dir in line:
+ if bad_dir in line or (not native and sysroot in line):
error_msg = "package %s contains bad RPATH %s in file %s" % (name, line, file)
sane = package_qa_handle_error(1, error_msg, name, file, d)
--
1.7.3.1
next reply other threads:[~2010-10-02 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 11:39 Holger Freyther [this message]
2010-10-02 20:34 ` RPATH in many modules Khem Raj
2010-10-03 2:02 ` Tom Rini
2010-10-03 7:24 ` Koen Kooi
2010-10-03 7:32 ` Holger Freyther
2010-10-03 7:37 ` Koen Kooi
2010-10-03 20:46 ` Khem Raj
2010-10-04 21:08 ` Denys Dmytriyenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CA719E0.7050409@freyther.de \
--to=holger+oe@freyther.de \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.