This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fortran,patch] PR 39178 - inline main()
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: FX <fxcoudert at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org, Tobias Burnus <burnus at net-b dot de>, Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Date: Tue, 26 May 2009 21:17:23 -0700
- Subject: Re: [Fortran,patch] PR 39178 - inline main()
- References: <FC75E055-191F-41A8-81D9-B20984466953@GMAIL.COM> <4A1C8BE5.3010505@gmail.com>
On Wed, May 27, 2009 at 01:40:05AM +0100, Dave Korn wrote:
> FX wrote:
> > Just a short note: maybe deprecating it for now would be the best
> > option, because a google codesearch reveals quite a few uses:
> > http://www.google.com/codesearch?q=%22-lgfortranbegin%22&hl=en
> >
> > I also think it's worth mentionning in the release notes.
>
> I would advise extreme caution with this kind of potential back-compat
> break. Even if people's makefiles are indeed nominally "doing the wrong
> thing" by linking it explicitly rather than using the driver to get the flags
> right, it's still not our business to punish them if we can easily make our
> system forgiving of their mistakes without imposing costs on others who are
> following the more correct usage.
>
This library is not documented anywhere in the gfortran info file.
If a user is explicitly linking to an undocumented library, then
s/he gets to deal with any changes that may occur in that library,
including its disappearance. Also note that this isn't a shared
library where caution is necessary even with library versioning,
because 3rd party libraries or binaries are dynamically linked.
Carrying around a useless library as a shim for users leads
to extreme bloat.
If you insist that this library stick around, then gfortran
should change MAIN__ to
void
MAIN__ (void)
{
fprintf(stderr, "libgfortranbegin.a has been removed from GCC\n");
fprintf(stderr, "Have a nice day!\n");
abort();
}
--
Steve