All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chin Huat Ang <chang@altera.com>
Cc: "'poky@yoctoproject.org'" <poky@yoctoproject.org>
Subject: Re: Using non-distro gcc
Date: Thu, 23 Feb 2012 08:31:09 +0000	[thread overview]
Message-ID: <1329985869.32110.50.camel@ted> (raw)
In-Reply-To: <0BB3B561D7068A4E89FD8E9ABFB538BEB0B9F942C2@PG-ITMSG03.altera.priv.altera.com>

On Wed, 2012-02-22 at 16:00 +0800, Chin Huat Ang wrote:
> My Centos 5.6’s gcc is a bit outdated and I’m seeing compiler bugs
> when compiling elfutils-native. As such I’ve rolled my own gcc 4.5.3
> with MPC/MPFR/GMP all installed to /opt, my intention is to make the
> new toolchain self-contained and reusable on other machines/distros.
>  
> The problem is that, in order to use this gcc I will need to set
> LD_LIBRARY_PATH so that it can picks up MPC/MPFR/GMP from /opt. 
>  
> Poky seems to always build with pristine environment (i.e. no
> LD_LIBRARY_PATH), so my new toolchain is unusable. This problem will
> not happen on distro gcc as MPC et al are always installed
> in /usr/lib.
>  
> Is there a way to tell Poky to set LD_LIBRARY_PATH whenever it uses
> the non-distro toolchain? Or is it the right thing to do at all?

You can set "export LD_LIBRARY_PATH=xxx" in your local.conf and that
will make bitbake always set the variable. I'm not sure you can do it
for just the target gcc.

Another alternative would be to put wrapper scripts around your
toolchain binaries and ensure they get found in PATH first and the
scripts setup the environment correctly.
> 
Its certainly possible to make this work but it might require a little
bit of experimentation. I'm surprised your toolchain doesn't set the
RPATHs of the binaries correctly to find the libs its linked to.

Cheers,

Richard



  reply	other threads:[~2012-02-23  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22  8:00 Using non-distro gcc Chin Huat Ang
2012-02-23  8:31 ` Richard Purdie [this message]
2012-02-24  8:01   ` Khem Raj
2012-02-24 10:19     ` Richard Purdie
2012-02-24 14:28       ` Chin Huat Ang
2012-02-24 15:26       ` 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=1329985869.32110.50.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=chang@altera.com \
    --cc=poky@yoctoproject.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.