Bug 40267 - Eventually get rid of libgfortranbegin.a
Eventually get rid of libgfortranbegin.a
Status: NEW
Product: gcc
Classification: Unclassified
Component: libfortran
4.5.0
: P3 enhancement
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-27 07:28 UTC by Tobias Burnus
Modified: 2009-05-28 21:50 UTC (History)
1 user (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".)