From 4ce888f590a227a7fb2fba093cff3f9423337170 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
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 <jeremy@jcline.org>
---
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