This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to build an RPATH into gcc?


On Thu, May 06, 2004 at 07:24:07PM +0400, Serge Belyshev wrote:

> RPATH is evil (BTW if you really want it, set LDFLAGS='-Wl,-rpath -Wl,/usr/local/lib').

Why is RPATH evil?
- it works
- I'm not making packages, I'm working in my own (homogenous)
  environment
- it doesn't require root privileges (which I don't have on the systems 
  in question)
- it doesn't require work on every single machine for every single
  new library

Your LDFLAGS suggestion is equivalent to the non-working LDFLAGS 
described in my mail.

> Much better:
> 
> # echo /usr/local/lib >> /etc/ld.so.conf
> # ldconfig
> #
> 
> And /lib/ld-linux.so.2 will search libraries there.

I didn't know NetBSD has a /lib/ld-linux.so.2 ...  ;-)

Besides the problem with this approach requiring root privileges, it's 
less easy to handle than RPATH when you compile for a /usr/local that's 
shared between _many_ machines.

> 		Serge

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]