summaryrefslogtreecommitdiff
path: root/debian/patches/build-math-object.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-12-01 17:44:24 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-12-01 17:44:24 +0300
commitc089c4500b0b78acf03ee5405ad250a84b0dfa66 (patch)
tree23870848d194569aff6e0e4e41bc7907960b1af1 /debian/patches/build-math-object.diff
parent377002e7300431b68f3548d9fd2c7f99cf883939 (diff)
downloadpython3.7-debian.tar.gz
Import python3.7 (3.7.5-2)debian/3.7.5-2debian
Diffstat (limited to 'debian/patches/build-math-object.diff')
-rw-r--r--debian/patches/build-math-object.diff23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches/build-math-object.diff b/debian/patches/build-math-object.diff
new file mode 100644
index 0000000..904e9eb
--- /dev/null
+++ b/debian/patches/build-math-object.diff
@@ -0,0 +1,23 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -22,7 +22,8 @@
+
+ MODBUILT_NAMES= _MODBUILT_NAMES_
+ MODDISABLED_NAMES= _MODDISABLED_NAMES_
+-MODOBJS= _MODOBJS_
++# filter out duplicate object files (_math.o)
++MODOBJS= $(sort _MODOBJS_)
+ MODLIBS= _MODLIBS_
+
+ # === Variables set by configure
+@@ -602,8 +603,9 @@ pybuilddir.txt: $(BUILDPYTHON)
+ fi
+
+ # This is shared by the math and cmath modules
++# don't build with -fPIC when building as math and cmath as builtins
+ Modules/_math.o: Modules/_math.c Modules/_math.h
+- $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
++ $(CC) -c $(if $(findstring _math.o, $(MODOBJS)),,$(CCSHARED)) $(PY_CORE_CFLAGS) -o $@ $<
+
+ # blake2s is auto-generated from blake2b
+ $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py