This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [ghudson@MIT.EDU: Re: -Xlinker and LDFLAGS]
The answer is simple: -R is not a compiler switch, it's a linker
switch on Solaris, that Sun's C Compiler used to pass through to the
linker, GCC does similarly on Solaris for compatibility, and GNU ld
accepts for compatibility with Solaris' linker.
It is normal for C compilers to pass linker switches through.
The Unix C compiler did that in the mid 80s.
The GNU ld switch is -rpath.
(It ought to be --rpath, right? Is it --rpath, or is it just -rpath?)
--rpath might be a reasonable name for this option. But is there a
good reason NOT to use -R on all systems? After all, the other
options in GNU ld were mostly inspired by various other BSD-ish
systems. If we support the functionality of -R, why not call it -R?
And why not have GCC forward it through?
Are there systems where -R in the native linker has some other
meaning instead?