This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: About GCC and the -R option (a linker option I believe)
- To: PATRICK dot O dot CESARD at saic dot com
- Subject: Re: About GCC and the -R option (a linker option I believe)
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 30 Mar 2000 19:40:37 +0200
- CC: help-gcc at gnu dot org
- References: <3C8C1135B453D311870C0008C7916A040C93D5@mcl-its-exs03.mail.saic.com>
> 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