Path to libstdc++
Alexandre Oliva
aoliva@redhat.com
Tue Mar 26 14:07:00 GMT 2002
On Mar 26, 2002, Allan Sandfeld Jensen <snowwolf@one2one-networks.com> wrote:
> What about letting g++ pass both -rpath $libpath and -rpath
> $LD_RUN_PATH? That way we keep linker behavior.
As long as the spelling of the option is -rpath, the linker accepts a
colon-separated path and the variable name is actually LD_RUN_PATH and
you introduce a way to let spec files decide whether to pass such a
flag depending on (i) whether LD_RUN_PATH is actually set and (ii)
whether the user didn't actually specify any -R/-rpath/equivalent
flags in the command line, yes, I'm all for it.
> For hpux I've found a small hack. Link applications with -Wl,+b: +b
> is hpux-ld -rpath argument and the single colon is magic for use
> -L$PATH as -rpath, and g++ always specifies the "correct path"(g++
> lib-installpath) for -L (link-time lib-searchpath).
Yup. And then, your user's packages that build shared libraries and
applications will go looking for libraries in their build trees long
after they're gone, just waiting for some hacker to find the pathnames
out, re-create such directories, populated them with his own libraries
and wait for someone to run the program and get 0wn3d :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Gcc
mailing list