* [PATCH V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH
@ 2012-08-16 3:15 Khem Raj
2012-08-16 6:44 ` Henning Heinold
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2012-08-16 3:15 UTC (permalink / raw)
To: openembedded-core
This fixes a case when RPATH embedded in program have one of
its path already relative to ORIGIN. We were losing that path
if such a path existed. This patch appends it to the new edited
rpath being created when we see it.
so RPATH like below
(RPATH) Library rpath:
[$ORIGIN/../lib/amd64/jli:$ORIGIN/../jre/lib/amd64/jli]
would end up being empty
but after this patch its kept intact
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/chrpath.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 10b5ca0..861d369 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -48,8 +48,9 @@ def process_dir (directory, d):
rpaths = curr_rpath.split(":")
new_rpaths = []
for rpath in rpaths:
- # If rpath is already dynamic continue
+ # If rpath is already dynamic copy it to new_rpath and continue
if rpath.find("$ORIGIN") != -1:
+ new_rpaths.append("%s" % (rpath.strip()))
continue
# If the rpath shares a root with base_prefix determine a new dynamic rpath from the
# base_prefix shared root
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH
2012-08-16 3:15 [PATCH V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH Khem Raj
@ 2012-08-16 6:44 ` Henning Heinold
2012-08-17 16:45 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Henning Heinold @ 2012-08-16 6:44 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Wed, Aug 15, 2012 at 08:15:46PM -0700, Khem Raj wrote:
> This fixes a case when RPATH embedded in program have one of
> its path already relative to ORIGIN. We were losing that path
> if such a path existed. This patch appends it to the new edited
> rpath being created when we see it.
>
> so RPATH like below
>
> (RPATH) Library rpath:
> [$ORIGIN/../lib/amd64/jli:$ORIGIN/../jre/lib/amd64/jli]
>
> would end up being empty
>
> but after this patch its kept intact
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/classes/chrpath.bbclass | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
> index 10b5ca0..861d369 100644
> --- a/meta/classes/chrpath.bbclass
> +++ b/meta/classes/chrpath.bbclass
> @@ -48,8 +48,9 @@ def process_dir (directory, d):
> rpaths = curr_rpath.split(":")
> new_rpaths = []
> for rpath in rpaths:
> - # If rpath is already dynamic continue
> + # If rpath is already dynamic copy it to new_rpath and continue
> if rpath.find("$ORIGIN") != -1:
> + new_rpaths.append("%s" % (rpath.strip()))
> continue
> # If the rpath shares a root with base_prefix determine a new dynamic rpath from the
> # base_prefix shared root
> --
> 1.7.9.5
Hi Khem,
just notice my solution some months ago
http://patches.openembedded.org/patch/24461/
Bye Henning
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH
2012-08-16 6:44 ` Henning Heinold
@ 2012-08-17 16:45 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-08-17 16:45 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, 2012-08-16 at 08:44 +0200, Henning Heinold wrote:
> On Wed, Aug 15, 2012 at 08:15:46PM -0700, Khem Raj wrote:
> > This fixes a case when RPATH embedded in program have one of
> > its path already relative to ORIGIN. We were losing that path
> > if such a path existed. This patch appends it to the new edited
> > rpath being created when we see it.
> >
> > so RPATH like below
> >
> > (RPATH) Library rpath:
> > [$ORIGIN/../lib/amd64/jli:$ORIGIN/../jre/lib/amd64/jli]
> >
> > would end up being empty
> >
> > but after this patch its kept intact
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > meta/classes/chrpath.bbclass | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
> > index 10b5ca0..861d369 100644
> > --- a/meta/classes/chrpath.bbclass
> > +++ b/meta/classes/chrpath.bbclass
> > @@ -48,8 +48,9 @@ def process_dir (directory, d):
> > rpaths = curr_rpath.split(":")
> > new_rpaths = []
> > for rpath in rpaths:
> > - # If rpath is already dynamic continue
> > + # If rpath is already dynamic copy it to new_rpath and continue
> > if rpath.find("$ORIGIN") != -1:
> > + new_rpaths.append("%s" % (rpath.strip()))
> > continue
> > # If the rpath shares a root with base_prefix determine a new dynamic rpath from the
> > # base_prefix shared root
> > --
> > 1.7.9.5
>
> Hi Khem,
>
> just notice my solution some months ago
>
> http://patches.openembedded.org/patch/24461/
I merged a version of this which simply does:
new_rpaths.append(rpath.strip())
since that is neater than using regexps.
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-17 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16 3:15 [PATCH V2] chrpath.bbclass: Account for case when ORIGIN is in RPATH Khem Raj
2012-08-16 6:44 ` Henning Heinold
2012-08-17 16:45 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox