Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Alt (http://www.linux-archive.org/gentoo-alt/)
-   -   RPATH/RUNPATH set automatically in gcc - How? (http://www.linux-archive.org/gentoo-alt/459541-rpath-runpath-set-automatically-gcc-how.html)

justin 11-30-2010 04:37 PM

RPATH/RUNPATH set automatically in gcc - How?
 
Hi all,

on prefix the RPATH/RUNPATH is automatically set to mach libraries from
the prefix. How is that done? And can we implement a solution for icc/ifc?


Cheers justin

Fabian Groffen 11-30-2010 04:42 PM

RPATH/RUNPATH set automatically in gcc - How?
 
On 30-11-2010 18:37:37 +0100, justin wrote:
> on prefix the RPATH/RUNPATH is automatically set to mach libraries from
> the prefix. How is that done? And can we implement a solution for icc/ifc?

We "patched" gcc to have the prefix usr/include included in the search
path, and we have an extended ld-wrapper that includes the library paths
from the prefix on every ld invocation.

You can't modify icc (I presume) so the first is difficult, but if
you're lucky you icc calls /usr/bin/ld which still can be the ld-wrapper
like we use.

The thing that should work, and that we have to use during bootstrap,
and platforms that don't have a gcc/ld that we build ourselves:
CPPFLAGS=-I/path/to/prefix/usr/include
LDFLAGS=-L/path/to/prefix/usr/lib ...


--
Fabian Groffen
Gentoo on a different level

Johan Hattne 12-02-2010 04:28 PM

RPATH/RUNPATH set automatically in gcc - How?
 
On 11/30/10 11:42, Fabian Groffen wrote:
> On 30-11-2010 18:37:37 +0100, justin wrote:
>> on prefix the RPATH/RUNPATH is automatically set to mach libraries from
>> the prefix. How is that done? And can we implement a solution for icc/ifc?

...

> You can't modify icc (I presume) so the first is difficult, but if
> you're lucky you icc calls /usr/bin/ld which still can be the ld-wrapper
> like we use.

I think you can modify binaries such as icc--at least on some
platforms--and I've been toying around with prefixed icc/ifc before. See


http://archives.gentoo.org/gentoo-alt/msg_77205c1b0a6ac9cb751979ea51b444b4.xml

Don't know whether this is the right way to go or not, but for the
handful of binary-only software packages that I regularly use, it seems
to be OK.

// Cheers; Johan


All times are GMT. The time now is 10:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.