From: Matthias Klose Date: Wed, 20 Jan 2021 14:49:22 +0000 (+0000) Subject: build-math-object X-Git-Tag: archive/raspbian/3.9.1-4+rpi1^2^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=43e6a484301dfcf932500993322ecef0d0ed33e2;p=python3.9.git build-math-object Gbp-Pq: Name build-math-object.diff --- diff --git a/Makefile.pre.in b/Makefile.pre.in index ed4015f..7a87cfe 100644 --- 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 @@ -619,8 +620,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