Received: by 10.213.65.68 with SMTP id h4csp1017604imn; Wed, 4 Apr 2018 11:06:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx48uTJ/N0b72rIHJJBGC44q3AYnaAqaABo5OIjKqhAoQVGTn0uPp44fqdNRW7aGlS9MJY2LI X-Received: by 10.101.69.198 with SMTP id m6mr12579154pgr.244.1522865201732; Wed, 04 Apr 2018 11:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522865201; cv=none; d=google.com; s=arc-20160816; b=tSqEFRGKo8cBWSi79oHQqRzSi/crXF8Bur6HWN3TvlpT7iNyLuVFaYOt7wntlKCLYY 8araDzGzfMIIqZR5B2DkI26upJmigAKEDbyog/VwOCqM/4VIiLTdRgFCLrSqhwOx/7nk xX5zDYDZq4AxZlSecVpLQvEVWWg69hdbluaNWeVKjmtKR1rlAjjEPXRtOS4eZw4Zek+/ ulegVXfiWzO6x60EICyvgHQwEoWeiYVRL+VZpmfRR6fQgA9r8xDcWqkiGAUrUKritjz9 XH52d5kGnhSVaxD6FLADc1noyv1vqOOkFR+9wzZt1TiDm2vG7oE7hiDvzJiYx43PJ9RW i/Hw== 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=tr5X2hAc/7OBZ3d0tsdi5Piq/bg7GzaOvJ12HwO8piw=; b=AWeyf2lGa4u9aO1zn5jzLX7E7v3KfrtBi6MaDowB39E0IlRahtFwCT6HK6bQSN6Onp G/ZdpqMi1hT7iEwBU6+qxWUn7VyT+H89K44t6PcA7hDRpxNbOAxDRlrrXChfxoPYPMgm aCMnSvRSlsnmJyIECGHLSEJMtRj7u/q6Pvd0STUggwuFg0m6e25bJzgRXTeY6jDJDLuF 1g/0sEV/X4M9oy81m6CImYv91jPgBn9NcK+VtUdvjxLua50gEzHBgZmkxEMv6JmOjfNG n/NXAe/CUubIm9GFkMyHVbSPBqRnPYAhDh18Ah4rTqwLGiLL4Xja2wfUDZp88EzAM/L7 Mf8A== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si4056191pgi.135.2018.04.04.11.06.27; Wed, 04 Apr 2018 11:06:41 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbeDDSE1 (ORCPT + 99 others); Wed, 4 Apr 2018 14:04:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58738 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbeDDSE0 (ORCPT ); Wed, 4 Apr 2018 14:04:26 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w34I0Mn7134273 for ; Wed, 4 Apr 2018 14:04:26 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h51k3x557-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 04 Apr 2018 14:04:26 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Apr 2018 19:04:23 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 4 Apr 2018 19:04:21 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w34I4Lef49283212; Wed, 4 Apr 2018 18:04:21 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 484C6AE057; Wed, 4 Apr 2018 18:54:26 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9546EAE055; Wed, 4 Apr 2018 18:54:25 +0100 (BST) Received: from localhost.localdomain (unknown [9.40.193.84]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 4 Apr 2018 18:54:25 +0100 (BST) From: Sandipan Das To: acme@kernel.org, jolsa@redhat.com Cc: linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com Subject: [PATCH 1/3] perf tools: Fix perf builds with clang support Date: Wed, 4 Apr 2018 23:34:17 +0530 X-Mailer: git-send-email 2.14.3 X-TM-AS-GCONF: 00 x-cbid: 18040418-0040-0000-0000-00000449C0E0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040418-0041-0000-0000-000020EDD1CF Message-Id: <20180404180419.19056-1-sandipan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-04_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804040180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For libclang, some distro packages provide static libraries (.a) while some provide shared libraries (.so). Currently, perf code can only be linked with static libraries. This makes perf build possible for both cases. Fixes: d58ac0bf8d1e ("perf build: Add clang and llvm compile and linking support") Signed-off-by: Sandipan Das --- tools/perf/Makefile.perf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index f7517e1b73f8..83e453de36f8 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -364,7 +364,8 @@ LIBS = -Wl,--whole-archive $(PERFLIBS) $(EXTRA_PERFLIBS) -Wl,--no-whole-archive ifeq ($(USE_CLANG), 1) CLANGLIBS_LIST = AST Basic CodeGen Driver Frontend Lex Tooling Edit Sema Analysis Parse Serialization - LIBCLANG = $(foreach l,$(CLANGLIBS_LIST),$(wildcard $(shell $(LLVM_CONFIG) --libdir)/libclang$(l).a)) + CLANGLIBS_NOEXT_LIST = $(foreach l,$(CLANGLIBS_LIST),$(shell $(LLVM_CONFIG) --libdir)/libclang$(l)) + LIBCLANG = $(foreach l,$(CLANGLIBS_NOEXT_LIST),$(wildcard $(l).a $(l).so)) LIBS += -Wl,--start-group $(LIBCLANG) -Wl,--end-group endif -- 2.14.3