Autoconf fix Darwin/MacOS X Fortran

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In lib/autoconf/fortran.m4 (v2.60 and cvs) there is a macro _AC_FC_LIBRARY_LDFLAGS which defines FLIBS for linking Fortran code.

Around line 664 is
          # Ignore these flags.
-lang* | -lcrt*.o | -lc | -lgcc | -libmil | -LANG:=* | - LIST:* | -LNO:*)

Darwin/MacOS X also include elements of the C library in libgcc_s.dylib and libSystem.dylib. While including -lSystem in the link command seems to be harmless, including -lgcc_s can cause large links to fail. Neither is necessary because ld automatically includes them.

The problems are fixed by changing the above lines to:
          # Ignore these flags.
-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | - LANG:=* | -LIST:* | -LNO:*)

I would not expect this to cause problems on other platforms, but I can't test it.

Regards
Bill Northcott



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux