This is the mail archive of the 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: [v3] 11612

On Dec 10, 2003, Benjamin Kosnik <> 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
Red Hat GCC Developer                 aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

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