Commit 58dab67f authored by Antoine Pitrou's avatar Antoine Pitrou

Merged revisions 85353 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85353 | antoine.pitrou | 2010-10-10 11:37:12 +0200 (dim., 10 oct. 2010) | 3 lines

  Issue #9437: Fix building C extensions with non-default LDFLAGS.
........
parent 7be5a65a
...@@ -318,6 +318,11 @@ def parse_makefile(fn, g=None): ...@@ -318,6 +318,11 @@ def parse_makefile(fn, g=None):
fp.close() fp.close()
# strip spurious spaces
for k, v in done.items():
if isinstance(v, str):
done[k] = v.strip()
# save the results in the global dictionary # save the results in the global dictionary
g.update(done) g.update(done)
return g return g
......
...@@ -251,6 +251,11 @@ def _parse_makefile(filename, vars=None): ...@@ -251,6 +251,11 @@ def _parse_makefile(filename, vars=None):
else: else:
# bogus variable reference; just drop it since we can't deal # bogus variable reference; just drop it since we can't deal
del notdone[name] del notdone[name]
# strip spurious spaces
for k, v in done.items():
if isinstance(v, str):
done[k] = v.strip()
# save the results in the global dictionary # save the results in the global dictionary
vars.update(done) vars.update(done)
return vars return vars
......
...@@ -105,8 +105,8 @@ LIBP= $(LIBDIR)/python$(VERSION) ...@@ -105,8 +105,8 @@ LIBP= $(LIBDIR)/python$(VERSION)
# Symbols used for using shared libraries # Symbols used for using shared libraries
SO= @SO@ SO= @SO@
LDSHARED= @LDSHARED@ LDSHARED= @LDSHARED@ $(LDFLAGS)
BLDSHARED= @BLDSHARED@ BLDSHARED= @BLDSHARED@ $(LDFLAGS)
LDCXXSHARED= @LDCXXSHARED@ LDCXXSHARED= @LDCXXSHARED@
DESTSHARED= $(BINLIBDEST)/lib-dynload DESTSHARED= $(BINLIBDEST)/lib-dynload
...@@ -404,8 +404,8 @@ platform: $(BUILDPYTHON) ...@@ -404,8 +404,8 @@ platform: $(BUILDPYTHON)
# Build the shared modules # Build the shared modules
sharedmods: $(BUILDPYTHON) sharedmods: $(BUILDPYTHON)
@case $$MAKEFLAGS in \ @case $$MAKEFLAGS in \
*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
esac esac
# Build static library # Build static library
...@@ -422,10 +422,10 @@ $(LIBRARY): $(LIBRARY_OBJS) ...@@ -422,10 +422,10 @@ $(LIBRARY): $(LIBRARY_OBJS)
libpython$(VERSION).so: $(LIBRARY_OBJS) libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \ if test $(INSTSONAME) != $(LDLIBRARY); then \
$(BLDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
$(LN) -f $(INSTSONAME) $@; \ $(LN) -f $(INSTSONAME) $@; \
else \ else \
$(BLDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
fi fi
libpython$(VERSION).dylib: $(LIBRARY_OBJS) libpython$(VERSION).dylib: $(LIBRARY_OBJS)
...@@ -433,7 +433,7 @@ libpython$(VERSION).dylib: $(LIBRARY_OBJS) ...@@ -433,7 +433,7 @@ libpython$(VERSION).dylib: $(LIBRARY_OBJS)
libpython$(VERSION).sl: $(LIBRARY_OBJS) libpython$(VERSION).sl: $(LIBRARY_OBJS)
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST) $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
# Copy up the gdb python hooks into a position where they can be automatically # Copy up the gdb python hooks into a position where they can be automatically
# loaded by gdb during Lib/test/test_gdb.py # loaded by gdb during Lib/test/test_gdb.py
...@@ -478,7 +478,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ ...@@ -478,7 +478,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
# for a shared core library; otherwise, this rule is a noop. # for a shared core library; otherwise, this rule is a noop.
$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
if test -n "$(DLLLIBRARY)"; then \ if test -n "$(DLLLIBRARY)"; then \
$(LDSHARED) $(LDFLAGS) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
else true; \ else true; \
fi fi
......
...@@ -48,6 +48,8 @@ Core and Builtins ...@@ -48,6 +48,8 @@ Core and Builtins
Library Library
------- -------
- Issue #9437: Fix building C extensions with non-default LDFLAGS.
- Issue #9759: GzipFile now raises ValueError when an operation is attempted - Issue #9759: GzipFile now raises ValueError when an operation is attempted
after the file is closed. Patch by Jeffrey Finkelstein. after the file is closed. Patch by Jeffrey Finkelstein.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment