Bug 40267 - Eventually get rid of libgfortranbegin.a
Summary: Eventually get rid of libgfortranbegin.a
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: 6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-27 07:28 UTC by Tobias Burnus
Modified: 2015-07-06 08:24 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-05-28 16:03:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2009-05-27 07:28:33 UTC
Follow up to PR 39178. Until that patch for GCC 4.5, gfortran generated for the main PROGRAM only "MAIN__" and no "main"; the latter was then included by linking libgfortran.a

With the patch (PR 39178), libgfortran.a became obsolete and is no longer linked by gfortran. It is still present, however, and thus "gcc ... -llibgfortranbegin" still works - but it has no effect. (At least when the *.o file with "main()" comes first - otherwise one gets a double-"main" linker error.)

Some makefiles explicitly link libgfortranbegin thus they will break when libgfortranbegin.a is removed (cf. link below).

Removal: Remove libgfortran/fmain.c, update libgfortran/Makefile.am and (re)generate libgfortran/Makefile.in

See the following thread about sentiments regarding the removal:

http://gcc.gnu.org/ml/gcc-patches/2009-05/threads.html#01604
Comment 1 Tobias Burnus 2009-05-28 21:50:44 UTC
Before removal, one may deprecate it as explained at:
 http://gcc.gnu.org/ml/fortran/2009-05/msg00400.html
 http://gcc.gnu.org/ml/fortran/2009-05/msg00401.html
(I needed to remove the   , "rd"  to get it assemble. And testing did not show an error for linking "file.o libgfortranbegin.a".)
Comment 2 Francois-Xavier Coudert 2015-07-06 08:23:06 UTC
Author: fxcoudert
Date: Mon Jul  6 08:22:34 2015
New Revision: 225445

URL: https://gcc.gnu.org/viewcvs?rev=225445&root=gcc&view=rev
Log:
	PR libfortran/40267
	* Makefile.am: Remove libgfortranbegin targets.
	* Makefile.in: Regenerate.
	* fmain.c: Remove.

Removed:
    trunk/libgfortran/fmain.c
Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
Comment 3 Francois-Xavier Coudert 2015-07-06 08:24:00 UTC
Fixed on trunk, will not be backported.