This is the mail archive of the
mailing list for the GCC project.
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)
- it doesn't require root privileges (which I don't have on the systems
- it doesn't require work on every single machine for every single
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.
"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