On Wed, Dec 29, 2004 at 01:15:52PM -0500, Robert P. J. Day wrote:
> *however*, if i just create that as an empty directory on the build
> system, then the compile seems happy even though the directory is
> entirely empty and gcc clearly doesn't need anything from it. and a
> check of the resulting executable shows that it has an internal rpath
> value of "/new". is there a way to understand why that's been
> happening?
Of course. You want the gcc driver to pass -R /new to the linker.
If you write
-Wl,-R,/new or -Wl,-R -Wl,/new
you tell the gcc driver exactly that, pass that to the linker.
With -Wl,-R /new
you tell the driver to pass -R to the linker and /new is a normal
argument, i.e. depending on current -x setting or extension/existence
of this file the driver decides what to do with it.
If it exists and is a directory, the driver decides to pass it to the
linker. If it doesn't exist, you get the same error as you get with
gcc ... non-existent.c
when non-existent.c does not exist.
Jakub
|