[ghudson@MIT.EDU: Re: -Xlinker and LDFLAGS]
Richard Stallman
rms@gnu.org
Fri Jan 12 11:19:00 GMT 2001
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?
More information about the Gcc
mailing list