From a9f3f7b34246c8d79c90f48a83ac896d95fe66f5 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Jun 29 2018 20:50:36 +0000 Subject: Fix building perf with Python 3.7 Signed-off-by: Jeremy Cline --- diff --git a/0001-Filter-out-link-time-optimization.patch b/0001-Filter-out-link-time-optimization.patch new file mode 100644 index 0000000..56bede3 --- /dev/null +++ b/0001-Filter-out-link-time-optimization.patch @@ -0,0 +1,31 @@ +From 4ce888f590a227a7fb2fba093cff3f9423337170 Mon Sep 17 00:00:00 2001 +From: Jeremy Cline +Date: Fri, 29 Jun 2018 18:13:40 +0000 +Subject: [PATCH] Filter out link-time optimization + +Python 3.7 adds some new cflags to "python3-config --cflags" and perf is +picking these up for a subset of the files it builds. These include +-flto, but nothing else is built with link-time optimization and the +linker is not happy about this. This is a quick fix since Python 3.7 is +about to be merged into Rawhide. + +Signed-off-by: Jeremy Cline +--- + tools/perf/Makefile.config | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index b5ac356ba323..be39d7862ae2 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -209,6 +209,7 @@ ifdef PYTHON_CONFIG + PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil + PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) + PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS)) ++ PYTHON_EMBED_CCOPTS := $(filter-out -flto%,$(PYTHON_EMBED_CCOPTS)) + FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) + endif + +-- +2.17.1 + diff --git a/kernel-tools.spec b/kernel-tools.spec index 6f224c8..7d0f7f5 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -5,7 +5,7 @@ # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. %global released_kernel 0 -%global baserelease 2 +%global baserelease 3 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -110,6 +110,7 @@ Patch3: 0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch Patch4: 0001-tools-lib-Remove-FSF-address.patch Patch6: 0002-perf-Don-t-make-sourced-script-executable.patch Patch8: 0001-Switch-to-python3.patch +Patch9: 0001-Filter-out-link-time-optimization.patch Name: kernel-tools Summary: Assortment of tools for the Linux kernel License: GPLv2 @@ -199,6 +200,7 @@ cd linux-%{kversion} %patch4 -p1 %patch6 -p1 %patch8 -p1 +%patch9 -p1 # END OF PATCH APPLICATIONS @@ -426,6 +428,9 @@ popd %license linux-%{kversion}/COPYING %changelog +* Fri Jun 29 2018 Jeremy Cline - 4.18.0-0.rc2.git0.3 +- Fix the build for Python 3.7 (rhbz 1593431) + * Fri Jun 29 2018 Jitka Plesnikova - 4.18.0-0.rc2.git0.2 - Perl 5.28 rebuild