You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/03/12 22:24:40 UTC

svn commit: r517406 - /incubator/stdcxx/trunk/etc/config/makefile.common

Author: sebor
Date: Mon Mar 12 14:24:40 2007
New Revision: 517406

URL: http://svn.apache.org/viewvc?view=rev&rev=517406
Log:
2007-03-12  Martin Sebor  <se...@roguewave.com>

	STDCXX-354
	* makefile.common (LDFLAGS): Moved -l$(LIBBASE)...
	(LDLIBS): ...to here, prepending it to the variable to keep runtime
	libraries that are already there last in order to allow symbols
	referenced in the former library and defined in the latter to be
	resolved by UNIX linkers.

Modified:
    incubator/stdcxx/trunk/etc/config/makefile.common

Modified: incubator/stdcxx/trunk/etc/config/makefile.common
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.common?view=diff&rev=517406&r1=517405&r2=517406
==============================================================================
--- incubator/stdcxx/trunk/etc/config/makefile.common (original)
+++ incubator/stdcxx/trunk/etc/config/makefile.common Mon Mar 12 14:24:40 2007
@@ -127,8 +127,11 @@
 # link with the produced library and the math library
 # (take care not to try to link the library with itself)
 ifeq ($(findstring $(LIBNAME),$(TARGET)),)
-  LDFLAGS += -L$(LIBDIR) -l$(LIBBASE)
-  LDLIBS  += -lm
+  LDFLAGS += -L$(LIBDIR)
+  # set the GNU make variable LDLIBS to the names of the libraries
+  # to link with (make puts $(LDLIBS) last on the link line in
+  # implicit rules)
+  LDLIBS  := -l$(LIBBASE) $(LDLIBS) -lm
 endif  # ifneq ($(LIBNAME),$findstring ($(LIBNAME),$(TARGET)))