This is the mail archive of the gcc-patches@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: A patch for g77spec.c


>  In message <199806220454.AAA26253@melange.gnu.org>you write:
>  > >  In message <199806220424.AAA26163@melange.gnu.org>you write:
>  > >  > >From the g77 documentation *in egcs*:
>  > >Then I would claim your documentation is in error as is your goal of
>  > >trying to provide version information for things external to the driver.
>  > 
>  > Ok, but understand g77 has been doing this for, well, over a year now,
>  > so I'd like to understand why it's an error.
>  > 
>  > >To get information about the backend and libraries you're going to
>  > >have to find another way.  What you're doing is simply wrong.
>  > 
>  > Okay, good, but *why*?
>Because it doesn't work and I don't think you can make it work reliably.

Okay, I'm confused, I thought I *had*.  Then it turns out it doesn't
work without -B (I assume) or installing it, which is not too
surprising, I guess.  Then somebody submits a patch that makes it
stop working the way it's document and that's installed.

But, as submitted by me, I believe that egcs-g77, when installed,
will work fine with `g77 -v'.

>If you can find a way to make it work reliably, then I'll withdraw the
>"wrong" and we'll get on with our lives :-)

Oh, okay, I thought you meant it was conceptually wrong.

>I'm concerned about
>
>"g77 -v"
>
>Giving errors.  We got *tons* of complaints about that with the egcs-1.0 releases
>(for g77 and g++).  I was getting such errors before installing HJ's
>patch.  And given the lack of control over the linker & assembler I
>don't see how you could make this work reliably.

That's strange, because the same lack of control over the linker and
assembler doesn't seem to inhibit "g77 foo.f" or "g77 -v foo.f" from
working, correct?  What exactly is the difference, besides "g77 -v"
giving temporary names to the object and executable files?

>  > Okay.  Why?  It has worked for a long time now.
>?!?  I've never seen it work correctly if you proceed to try and
>link the program.  Then again, I may be working on different platforms
>and I've not been a g77 hacker :-)

Well, maybe there's something to that.  How about if we *try* to
enable it, i.e. without HJ's patch that disables the thing entirely,
and see whether it'll work on various systems, and, as I said,
have a bit of patience with it -- perhaps considering whether problems
believed to be due to "it" are really telling us something else?

>  > >  > In short, that info *is* obtained, by, as you put it, "running the
>  > >  > backend...and other crud".  Dunno about running collect2 -- because
>  > >  > I don't know whether that's an issue for g77.
>  > >It's an issue.
>  > 
>  > Why?
>Because collect2 is going to be run on many targets.  It's going to try 
>and link the non-existant program, then run nm on the result.  That's
>not going to work when the link fails.

*What* non-existant program?  "g77 -v" as I've architected it for
some time has compiled, linked, executed, and then deleted a real,
living, breathing program.  That's how the library version info is
produced.  You can see this in the output of "g77 -v" for yourself;
the assembler and linker are given *real* inputs and outputs as usual,
just that they're temporary names.

The big change with g77 0.5.23 (gcc 2.8) and now egcs 1.1 is that
there's no distinct g77 driver that invokes the gcc driver and
also manages the temp-name/execution/removal stuff.  Instead, the
new lang-specs.h stuff persuades the g77-ish gcc driver to do that
all by itself.  There might be problems with that; if so, I'd like
to find that out, since they'd probably exist with 0.5.23 as well
(though nobody's reported anyway, AFAIK).

>But having "driver -v" report an error is not fine.  If you can reliably
>make the error go away, then I'm satisfied.

Once installed, there should be no errors.  Otherwise, -B must be
used.  This is normal for doing any "real work" anyway; telling
someone to do "./g77 -v foo.f" on an *uninstalled* compiler is asking
for trouble, because they'll link in the wrong libraries, right?
They should be using "./g77 -B./ -v foo.f" instead, and, accordingly,
"./g77 -B./ -v" to get complete version info without having to
write and run a dummy test program.

        tq vm, (burley)


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