This is the mail archive of the gcc@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: [ghudson@MIT.EDU: Re: -Xlinker and LDFLAGS]



On Thu, Jan 11, 2001 at 10:06:38AM -0800, Joe Buck wrote:
> > On Jan 11, 2001, Joe Buck <jbuck@racerx.synopsys.com> wrote:
> > 
> > > And maybe -R *should* work on any platform where the linker supports
> > > the -R switch.
> > 
> > This would probably make matters even worse.  GNU ld accepts -R as an
> > alias to -R on all platforms it supports.  But that doesn't mean the
> > native linker does.  So, GCC's accepting -R would depend on whether
> > it's configured to use GNU ld or the native linker.  Doesn't appeal to
> > me.
> 
> Fine, only support -R where we know that either GNU ld is always used,
> or the native linker supports -R.

We would either need to track all those platforms, or automatically
detect them.

Deteting them a la Autoconf would be interesting (in the Chinese curse
sense); just because a given platform's linker accepts -R doesn't mean
that the linker is doing what we expect.

As an example, GNU ld itself assigns completely different means to -Rfoo
depending on whether foo is a directory or not.


I'll reiterate my suggestion that on platforms where we don't already
pass -R, we should recognize and warn about it.  Something like "-R is way
nonportable, maybe you want to start using -Wl".  I was the one who started
the last round of discussion on this topic, but I've become convinced that
silently supporing -R may not be best for users in the long run.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.

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