This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 (was *.f *.c linking problem)
- To: htl10 at cus dot cam dot ac dot uk
- Subject: Re: g77 (was *.f *.c linking problem)
- From: Craig Burley <burley at gnu dot org>
- Date: Tue, 14 Jul 1998 07:44:31 -0400 (EDT)
- CC: egcs-bugs at cygnus dot com
>Yes, I found that I had to put in the `xargc' and `xargv' globals into the
>original C wrapper even after stripping out main.o from libf2c. It is not
>much really (just a few lines, two globals and two within main. to map
>xargc=argc inside main), it doesn't break the portability of the program
>so I left them there... just thought it would be nice to have the egcs
>compiler working in the same way as the proprietary sun compilers...
Looks like you already understand the problem and the workaround pretty
well. Note that your solution will stop working as of g77 0.5.23 and
egcs 1.1 -- instead, have your main() call f_setarg(argc, argv), and
maybe f_setsig() and f_init() as well, as indicated in the documentation
for those versions. That should be a better long-term portable
solution, as long as you link with g77's version of libf2c (and maybe
the netlib people will accept these changes into its version).
>So which is more "recent/up-to-date"? I thought egcs is more up-to-date
>(more bug-fixes) than 2.8.1? But it sounds like the g77 0.5.23 (or 0.5.24)
>which works with gcc 2.8.1 is more recent than the g77 part of egcs
>1.0.3a?
gcc 2.8.1 came out around the same time as egcs 1.0.3a (or 1.0.2) or
so, so those two have roughly the same bug fixes. (They're not
identical, though; sometimes one has an optimization that another
doesn't have, which can also mean it has, or exposes, bugs the
other doesn't.)
However, g77 0.5.23 is the most recent released version of g77 and
the corresponding libf2c, while egcs 1.0.3a included basically a
variant of g77 0.5.22.
The official FSF version of g77 and the egcs version will probably
do a bit of leapfrogging due to different release schedules, although
right now I'm working on reducing the differences, which might mean
FSF-g77 gets released right around the same time as any new egcs
(assuming the latter has g77 changes). 0.5.23 "made up" for a huge
existing problem, namely, that no non-egcs version of g77 existed
that operated on the gcc 2.8 backend (which is what egcs 1.0 started
with, basically), but it also included some changes that have yet to
appear in a released version of egcs.
However, egcs *snapshots* (and the CVS source tree) have generally had
the latest g77 improvements within a week or two, though with the
0.5.23 changes there was a longer delay because there were so many
of them.
Since the g77 version you get includes both g77 and libf2c, that's
mostly what you'll notice in terms of which new fatures and such that
it has.
egcs 1.1 is now in "bug-fix-only" mode, and should be released soon.
(See <http://www.cygnus.com/egcs>, I assume.) If you can't wait,
try g77 0.5.23. At least you could experiment with 0.5.23 to get
your code prepared for egcs 1.1.
tq vm, (burley)