autoconf
[Top][All Lists]
Advanced

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

Autoconf fix Darwin/MacOS X Fortran


From: Bill Northcott
Subject: Autoconf fix Darwin/MacOS X Fortran
Date: Thu, 24 Aug 2006 17:59:40 +1000

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]