All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Ross <andy.ross@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] gcc-4.7: Add fix for libtool rpath problems
Date: Fri, 24 Aug 2012 09:29:36 -0700	[thread overview]
Message-ID: <5037ABF0.1030908@windriver.com> (raw)
In-Reply-To: <1345825168.14369.85.camel@ted>

On 08/24/2012 09:19 AM, Richard Purdie wrote:
> I'd love to have a better fix for this. I suspect its taking the path
> from some "gcc -print-xxxx" call which returns/usr/lib/../lib on x86_64
> so we could try and normalise it at source...

Yeah, but that sounds like whack-a-mole to me.  It's just too tempting
for upstream software to glue up a path name with .., it's very sane
for a human being.

One of the (comparatively few) spots where I actually isolated the
source of one of these is in gettext, where the configure script needs
a --with-ncurses-prefix to be "/usr".  So the bitbake recipe sets it
to ${STAGING_LIBDIR}/.., which seems clearly correct to me.  And then
somewhere in the configure script that turns into a libtool library
path of <ncurses_prefix>/lib (again completely correct), thus
"/usr/lib/../lib".  And even then it's correct and if used for a -L
argument would never cause a problem.

It's libtool which has special requirements here, becuase it's trying
to set rpaths based on those funny strings and has to have them
normalized.  So I'd argue that it's in libtool where this magic has to
happen.

Before I realized you already fixed the gcc-runtime issue, I was
looking at finding a place farther up the stack where this could be
done.  That is, sanitize all inbound paths at the spot where they're
parsed at the command line.  The current cases we know we need to hit
are -lib and -rpath, though I'm no libtool expert and am surely
missing some...

Andy




  reply	other threads:[~2012-08-24 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 14:12 [PATCH] gcc-4.7: Add fix for libtool rpath problems Richard Purdie
2012-08-24 14:57 ` Khem Raj
2012-08-24 15:29   ` Richard Purdie
2012-08-24 16:38     ` Khem Raj
2012-08-24 15:53 ` Andy Ross
2012-08-24 16:19   ` Richard Purdie
2012-08-24 16:29     ` Andy Ross [this message]
2012-08-24 16:37       ` Khem Raj

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=5037ABF0.1030908@windriver.com \
    --to=andy.ross@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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.