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
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".)
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
Fixed on trunk, will not be backported.