From: Andy Ross <andy.ross@windriver.com>
To: openembedded-core@openembedded.org
Subject: [PATCH 1/2] insane.bbclass: Fix RPATH warning in the face of funny path strings
Date: Fri, 17 Aug 2012 08:53:10 -0700 [thread overview]
Message-ID: <1345218791-28891-2-git-send-email-andy.ross@windriver.com> (raw)
In-Reply-To: <1345218791-28891-1-git-send-email-andy.ross@windriver.com>
In toolchain edge cases it's possible for the RPATH of a library to be
set to something like "/usr/lib/../lib". This should be detected as
"/usr/lib" and generate a warning.
Signed-off-by: Andy Ross <andy.ross@windriver.com>
---
meta/classes/insane.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 556a176..b84a89f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -161,6 +161,10 @@ def package_qa_check_rpath(file,name, d, elf, messages):
if dir in line:
messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file))
+def rpath_eq(a, b):
+ import os.path
+ return os.path.normpath(a) == os.path.normpath(b)
+
QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths"
def package_qa_check_useless_rpaths(file, name, d, elf, messages):
"""
@@ -181,7 +185,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
m = rpath_re.match(line)
if m:
rpath = m.group(1)
- if rpath == libdir or rpath == base_libdir:
+ if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
--
1.7.11.2
next prev parent reply other threads:[~2012-08-17 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 15:53 [PATCH 0/2] RPATH host pollution fixes Andy Ross
2012-08-17 15:53 ` Andy Ross [this message]
2012-08-17 15:53 ` [PATCH 2/2] libtool: normalize link paths before considering for RPATH Andy Ross
2012-08-19 10:06 ` Richard Purdie
2012-08-20 16:59 ` Andy Ross
2012-08-20 21:55 ` Richard Purdie
2012-08-17 16:20 ` [PATCH 1/2] insane.bbclass: Fix RPATH warning in the face of funny path strings Richard Purdie
2012-08-20 21:05 ` [PATCH] " Andy Ross
2012-08-21 15:49 ` Saul Wold
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=1345218791-28891-2-git-send-email-andy.ross@windriver.com \
--to=andy.ross@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox