[v3] 11612
Alexandre Oliva
aoliva@redhat.com
Wed Dec 10 18:00:00 GMT 2003
On Dec 10, 2003, Benjamin Kosnik <bkoz@redhat.com> wrote:
> Ok, this is very weak. How does one find the toplevel gcc build
> directory, or more precisely the directory with libgcc?
If GCC/libgcc are known to be in the build tree, I believe this works:
$(CC) -print-libgcc-file-name | sed 's,/[^/]*$,,'
If CC could point to a gcc install tree, then I can't think of any
simple solution.
Ideally, you shouldn't encode a directory within the build tree into a
library or program that's going to be installed, but this is not the
case of testsuite, so it's fine. You might want to consider using -R
instead of the not-as-portable LD_RUN_PATH, though; libtool supports
-R portably, and produces the desired effect.
Except for executables or libraries created for installing (again, not
your case). For those, the only way to tell libtool to encode the
build-time run paths into the build-tree executables/libraries, but
not in the install-tree ones, is to have the dependency library be a
libtool library.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
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-patches
mailing list