Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1917729imm; Tue, 10 Jul 2018 09:59:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdR4NZRpKt3369jOOi5Sp0V8sjFbWPPODTxFLY9oRO1sjMauU+uXDyJgNY4n04AdPr9J3gL X-Received: by 2002:a62:4909:: with SMTP id w9-v6mr26746728pfa.154.1531241957710; Tue, 10 Jul 2018 09:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531241957; cv=none; d=google.com; s=arc-20160816; b=KLUBVQ+ESEYpicpB75PPcVDdHOnu4B6wmxind/7m4azgWL0VswZj0knznmvFRAucgJ kfx9IbIveRtgYsSQK35acp1IWDGYbv+u1kMpXf7Lgg1BRwfGVEsnaJEOu7RxDIrbaIWU 8tVVekM7gJ5h7Ol9FPfVXMNma5VUQs1kkix/4l2l3HKYcQ/OPGArM6DK4DoUDQQRL7gt kn1QnFcScsVrl2Sta+cI/nlY+kixIEME1jwJIRKtB03AZ0rd2N9rBDelUOyuw+vfSBfY zBoSGNRch3PObu+6F9N2OOkcFK6BrIeyPoPBFFfMJNSWXo6hVBNfFqLeOt+mC69e+MD3 O1Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qvKdnmMAhVH86MYxmbRR/Z6n2t8Km+nu4IYAQLHJErU=; b=yHW15UXq+gVEh0WjiY1WQmk6nYD5C5207UseFgxx7VE6Hcguaa6VMObfppRGdFATbo Ln+JqSXGrBmTL8yT5K9UUgBZs9jqr++3l1yEtfcaF7Tb3+A2K3NaDupwTnytnZM8hIjk pzG5MAlUUTUxGWeZFn/uamG1C6vAbrCwjPfWfw2reUUy/UEkHh6I04JDy+1kmy1qKjU5 3qZW+je3Q5MysiPVmZv6JZHZQ1YNg5NcLpnlnSYy8O9IaeSGNkyI+nnq58rwrvG/MyeN 6vyue+ovwtfZeWPeqYLGlNvvGSRop5QEkGRG3etYEZHsTbSYIGoyHNgd6bGxSpkamLRM QYrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23-v6si17270946pls.134.2018.07.10.09.59.02; Tue, 10 Jul 2018 09:59:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934285AbeGJPra (ORCPT + 99 others); Tue, 10 Jul 2018 11:47:30 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:43450 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933506AbeGJPr2 (ORCPT ); Tue, 10 Jul 2018 11:47:28 -0400 Received: by mail-qk0-f194.google.com with SMTP id z74-v6so11778638qkb.10 for ; Tue, 10 Jul 2018 08:47:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qvKdnmMAhVH86MYxmbRR/Z6n2t8Km+nu4IYAQLHJErU=; b=QQKRzKitq0/5lq7yFjC9ISQA0B0swb95xgReWBVzgfAoh0Dcb2p32U4RtaKl4pd6/T 2+JTY+vGLSl6bK03RVI0tmjty5V/BjppoH0e2brVNjK6+TAPoGOgslI3HOlkW8siCmBx elJLfMZi+wIm5Is5VxiwF1ArHQ99A7ENmYQl/gNPpDeGJqffg7HVgYgIBPD8YpqpUYx9 QWHZ6tPZdZ1FYAkVvN2jnUuwJ5My1LNjF1V65YJ8yVx3Fg1KLDDJnlT3w0i6ClRirqJF AgdtixSfm4ZZ8Z63SHD6c0g4Pjfp3ixaHbGXvFfz4eT72g90ptiDqjNc/IPKfRCQ2/9n 2I1Q== X-Gm-Message-State: APt69E1teSG79kZItqmHlWZj1j0V49Z78aClZbjni1JIBqvgy3quYiyt yXwP8e/IZtatQUpN6YZYwbsC7Q== X-Received: by 2002:a37:6713:: with SMTP id b19-v6mr22197251qkc.63.1531237647501; Tue, 10 Jul 2018 08:47:27 -0700 (PDT) Received: from laptop.jcline.org.com (nat-pool-rdu-t.redhat.com. [66.187.233.202]) by smtp.gmail.com with ESMTPSA id l7-v6sm13646085qtc.27.2018.07.10.08.47.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 08:47:26 -0700 (PDT) From: Jeremy Cline To: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra Cc: Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Cline Subject: [PATCH] perf: Use python-config --includes rather than --cflags Date: Tue, 10 Jul 2018 11:46:12 -0400 Message-Id: <20180710154612.6285-1-jcline@redhat.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Builds started failing in Fedora on Python 3.7 with: `.gnu.debuglto_.debug_macro' referenced in section `.gnu.debuglto_.debug_macro' of util/scripting-engines/trace-event-python.o: defined in discarded section In Fedora, Python 3.7 added -flto to the list of --cflags and since it was only applied to util/scripting-engines/trace-event-python.c and scripts/python/Perf-Trace-Util/Context.c, linking failed. It's not the first time the addition of flags has broken builds: commit c6707fdef7e2 ("perf tools: Fix up build in hardnened environments") appears to have fixed a similar problem. "python-config --includes" provides the proper -I flags and doesn't introduce additional CFLAGS. Signed-off-by: Jeremy Cline --- tools/perf/Makefile.config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index b5ac356ba323..f5a3b402589e 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -207,8 +207,7 @@ ifdef PYTHON_CONFIG PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null) PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS)) 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 := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null) FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) endif -- 2.17.1