"MAIN__();" is a _call_ to Fortran's equivalent of main(), as output by f2c... <grin>Replacing it with "return(0)" may be nice for teraflop record breaking, but is rather disappointing for real calculations</grin>. Please remove the patch.
+*libf2c-20110801-r1 (31 Aug 2012) + + 31 Aug 2012; Justin Lecher <jlec@gentoo.org> libf2c-20090407-r1.ebuild, + -libf2c-20110801.ebuild, +libf2c-20110801-r1.ebuild, metadata.xml: + Drop main.patch, #421975 +
Created attachment 322838 [details, diff] weak_alias for main could you try to link f2c to fortran with following patch?
correction try that, for the 2nd bit: --- /dev/null +++ b/main_foo.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <stdlib.h> + + +void missing_MAIN__ (void) +{ + fprintf(stderr, "The Fortran main program is missing.\n"); + abort(); +} +void MAIN__ (void) __attribute__ ((weak, alias("missing_MAIN__")));
(In reply to comment #3) > correction try that, for the 2nd bit: > --- /dev/null > +++ b/main_foo.c > @@ -0,0 +1,10 @@ > +#include <stdio.h> > +#include <stdlib.h> > + > + > +void missing_MAIN__ (void) > +{ > + fprintf(stderr, "The Fortran main program is missing.\n"); > + abort(); > +} > +void MAIN__ (void) __attribute__ ((weak, alias("missing_MAIN__"))); Thanks, I see no side effects. Not sure about exotic archs (or non-gcc), though.
okay. I will add this back then.
+*libf2c-20110801-r2 (04 Sep 2012) + + 04 Sep 2012; Justin Lecher <jlec@gentoo.org> -libf2c-20110801-r1.ebuild, + +libf2c-20110801-r2.ebuild, +files/libf2c-20110801-main.patch: + Adding new main() patch, #421975 +
*** Bug 434204 has been marked as a duplicate of this bug. ***