This is the mail archive of the gcc-help@gcc.gnu.org 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]

Re: About GCC and the -R option (a linker option I believe)


> I have been reading the gcc manual entitled "Using and Porting the GNU
> Compiler Collection" but cannot find any documentation about the -R option
> used to include shared library directory paths in an executable.  I've
> used this option with gcc on my Solaris 2.7 machine and it works but it is
> not recognized by gcc on my HPUX10-20 machine. That's why I decided to
> actually look it up the gcc manual.

This option is not a gcc option, but a linker option. GCC recognizes
some of the assembler and linker options of the native tools, and
passes them through to those tools. What those options are highly
depends on the platform, and possibly on the exact version of the
assembler and linker.

It is safer to use use the -Wl, option of gcc to pass options to the
linker, that way, there is no confusion with options to other
passes. You'll have to look for the equivalent of -R in your linker
documentation, then.

Regards,
Martin


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