The package rpms/python.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python.git/commit/?id=15930a73d29....
Change:
+%ifarch %{ix86} x86_64
Thanks.
Full change:
============
commit 15930a73d2954a44ce3c625fc7c4c35053458c9f
Author: Charalampos Stratakis <cstratak(a)redhat.com>
Date: Wed May 10 21:42:38 2017 +0200
Enable profile guided optimizations for x86_64 and i686 architectures.
Added patch for fixing recompilation of Python when using common
build commands and the --enable-optimizations flag.
diff --git a/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
b/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
new file mode 100644
index 0000000..2e5b33d
--- /dev/null
+++ b/00269-fix-multiple-compilations-issue-with-pgo-builds.patch
@@ -0,0 +1,63 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 9e4be0a..a58b59c 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -863,12 +863,12 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
+ TESTOPTS= -l $(EXTRATESTOPTS)
+ TESTPROG= $(srcdir)/Lib/test/regrtest.py
+ TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
+-test: all platform
++test: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+
+-testall: all platform
++testall: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ $(TESTPYTHON) $(srcdir)/Lib/compileall.py
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+@@ -877,7 +877,7 @@ testall: all platform
+
+ # Run the unitests for both architectures in a Universal build on OSX
+ # Must be run on an Intel box.
+-testuniversal: all platform
++testuniversal: @DEF_MAKE_RULE@ platform
+ if [ `arch` != 'i386' ];then \
+ echo "This can only be used on OSX/i386" ;\
+ exit 1 ;\
+@@ -900,14 +900,14 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3
\
+ test_multibytecodec test_urllib2_localnet test_itertools \
+ test_multiprocessing test_mailbox test_socket test_poll \
+ test_select test_zipfile
+-quicktest: all platform
++quicktest: @DEF_MAKE_RULE@ platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
+
+ MEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
+ test_longexp
+-memtest: all platform
++memtest: @DEF_MAKE_RULE@ platform
+ -rm -f $(srcdir)/Lib/test/*.py[co]
+ -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
+ $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
+@@ -1198,7 +1198,7 @@ LIBPL= $(LIBP)/config$(DEBUG_SUFFIX)
+ # pkgconfig directory
+ LIBPC= $(LIBDIR)/pkgconfig
+
+-libainstall: all python$(DEBUG_SUFFIX)-config
++libainstall: @DEF_MAKE_RULE@ python$(DEBUG_SUFFIX)-config
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+@@ -1425,7 +1425,7 @@ distclean: clobber
+ -exec rm -f {} ';'
+
+ # Check for smelly exported symbols (not starting with Py/_Py)
+-smelly: all
++smelly: @DEF_MAKE_RULE@
+ nm -p $(LIBRARY) | \
+ sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
+
diff --git a/python.spec b/python.spec
index 0c196be..d279ac6 100644
--- a/python.spec
+++ b/python.spec
@@ -108,7 +108,7 @@ Summary: An interpreted, interactive, object-oriented programming
language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.13
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@@ -743,6 +743,12 @@ Patch193: 00193-enable-loading-sqlite-extensions.patch
Patch198: 00198-add-rewheel-module.patch
%endif
+# 00269 #
+# Fix python's recompilation with common build commands when using
+# profile guided optimizations.
+# Fixed upstream:
http://bugs.python.org/issue29243
+Patch269: 00269-fix-multiple-compilations-issue-with-pgo-builds.patch
+
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL,
etc.,
@@ -1052,6 +1058,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
%if 0%{with_rewheel}
%patch198 -p1
%endif
+%patch269 -p1
# This shouldn't be necesarry, but is right now (2.2a3)
@@ -1186,7 +1193,11 @@ BuildPython debug \
BuildPython optimized \
python \
python%{pybasever} \
+%ifarch %{ix86} x86_64
+ "--enable-optimizations" \
+%else
"" \
+%endif
true
@@ -1903,6 +1914,9 @@ rm -fr %{buildroot}
# ======================================================
%changelog
+* Wed May 10 2017 Charalampos Stratakis <cstratak(a)redhat.com> - 2.7.13-2
+- Enable profile guided optimizations for x86_64 and i686 architectures
+
* Wed Jan 11 2017 Charalampos Stratakis <cstratak(a)redhat.com> - 2.7.13-1
- Update to 2.7.13