"-lm" is a symlink to libSystem.dylib on all recent Darwin and therefore not required (as libSystem is automatically provided by gcc).
Using -lm (especially when in conjunction with "-flat_namespace") can cause unexpected differences in behavior between Darwin 9 -> Darwin10 (where the unwinder was moved to libSystem) - since it causes libSystem to be placed ahead of other libs.
- I guess it could be a config subsitution if anyone thinks it worth it for (really) ancient Darwin support - but I've just removed it.
(no Ada regressions from this on *-darwin9 and x86-64-darwin10.) OK for trunk? Iain ada: * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove reference to "-lm".
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 4be366e..8974a99 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2664,7 +2666,7 @@ gnatlib-shared-darwin: $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(SO_OPTS) \ -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ - $(MISCLIB) -lm + $(MISCLIB) cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \