diff mbox

[Ada,Darwin] Remove explicit "-lm" from shared library builds.

Message ID 0582E313-6D67-4146-A051-340C7AC47522@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Sept. 6, 2011, 7:22 a.m. UTC
"-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".

Comments

Arnaud Charlet Sept. 6, 2011, 7:57 a.m. UTC | #1
> (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".

OK, thanks.
diff mbox

Patch

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) \