]> granicus.if.org Git - python/commitdiff
Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
authorGregory P. Smith <greg@mad-scientist.com>
Tue, 2 Sep 2008 05:29:51 +0000 (05:29 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Tue, 2 Sep 2008 05:29:51 +0000 (05:29 +0000)
library targets in the Makefile.

Makefile.pre.in
Misc/NEWS

index d3e8535624504574b95e0c9ec3c137cfed68dfc7..349b8148184563d1ae28b8b5167ed3a9229f3225 100644 (file)
@@ -412,14 +412,14 @@ $(LIBRARY): $(LIBRARY_OBJS)
 
 libpython$(VERSION).so: $(LIBRARY_OBJS)
        if test $(INSTSONAME) != $(LDLIBRARY); then \
-               $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+               $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
                $(LN) -f $(INSTSONAME) $@; \
        else\
-               $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+               $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
        fi
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
-       $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+       $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
 
 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
 # minimal framework (not including the Lib directory and such) in the current
@@ -453,8 +453,8 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
 # for a shared core library; otherwise, this rule is a noop.
 $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
        if test -n "$(DLLLIBRARY)"; then \
-               $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
-                       $(LIBS) $(MODLIBS) $(SYSLIBS); \
+               $(LDSHARED) $(LDFLAGS) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
+                       $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
        else true; \
        fi
 
index 76df45c8c3cc0292e218f2072fe5fb1a71ea6e98..a1074736aeaf068ff9fe851e4f114c5af6eed81e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -45,6 +45,9 @@ Core and Builtins
 - Added warnings on the use of ``__getslice__``, ``__setslice__``, or
   ``__delslice__``.
 
+- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
+  library targets in the Makefile.
+
 C-API
 -----