Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1470534lqj; Tue, 4 Jun 2024 02:33:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbgBaUk+6EneAAOuYRMeFBYW7gfxY/QYbA7RS3OJZhx0fFg/fM6OMyzOlXcWW9aGns9kmUkIuZL/PYvHUf24LvUq+3PNBiveu6w8O0Ng== X-Google-Smtp-Source: AGHT+IEvO1pkrwBAUW45PGwRR4byDdTH0RwR0w6r/2DrUq3UqxBAOBdwSVSS7Dhyey1mGfuJF2CY X-Received: by 2002:a05:690c:242:b0:609:efe8:2bfc with SMTP id 00721157ae682-62c7972dd40mr107453137b3.27.1717493627447; Tue, 04 Jun 2024 02:33:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717493627; cv=pass; d=google.com; s=arc-20160816; b=rRGAisTZ5PCBdT3velATUhRm3AYXMxgqhwE8LkRZDV/lOxzTTeSBYYngbyvJSGgapQ nyzOJideirkUZFw8JvB1dk5RyDmLO8E83XEsHXshBx1Vp5MwNZ3QF7pEavg7/ID32xcY oFlL9gRCipjeZWaOryiu3CFH8BAWF50sXUyU0yhcwUXytzyTfsQ6H93W4PJbcTZVWjm4 8Brg97yAzjQGi0H/2TzLzMxK1fDHMVyKp89LhBX8KXT9+6H0MYHe17Faef8lvAL7hzcv kZkKudBYm7usgyQ1TtN7S4gqnc/f4jg3vz2ozHdO1bU/qbJC3/mfb1J2qxgwxIx0ZLML 6NXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=Jvy7uVaCWEtSSiKNjPPuDKEgWblyWBQrMXOb4Cln2Fg=; fh=KSiWrCR7xjqa6nMnB8EyauKJbY8zFKZ3kSm6JhLxeok=; b=jDx2mCoVUN/naXMB49QcwS+MSj4qVCk5wv6TwQLo8PwIDfHvYrvo5zTL+eWZjBg/e8 4xCdzDxHLruQFAaQtvppM2Z6rlU7InmpaUDMS8bGauk/H0K7Hueve2RojOS1jCl59v6X T5m1nfAFR3Om92rO8i0yIyTQiHVJIfccJHo+OBx5Hn+7NDzfBA5eJ++s4bfRHe3jbsyZ P5pL+XsdiPg69YXwsJMNoT7npM4yUdoYiASEY3FH7AdthR+CY+opg0MC+vEtW9psbqMz GVwzEMhhCLGMz0KnAFOGZkQ56Di2UNdoXe/oF70Kwu4jMRwCGLfhu99dZOJ+73RTK56J zkwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-200355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b43e633si8093696d6.573.2024.06.04.02.33.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:33:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-200355-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C9E981C20A38 for ; Tue, 4 Jun 2024 09:33:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C498D143C6D; Tue, 4 Jun 2024 09:32:42 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E23D143C61; Tue, 4 Jun 2024 09:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493562; cv=none; b=NuuF1H7GAdr+0qX6Vnjh6Me5PNxko/L9nJTmH6Y81wQR6qtpaNzmrBspI7wxus20h0bJetD/V4Urr0Z4FtZ5VKWqVm2zuwLMdv7z11N6JTgO7RLyhW1OEonQDExzTrqgjM+GwxpStBPXiXpvcxq73bnqioBluY98mIOgBIwX6Do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493562; c=relaxed/simple; bh=AjPsIIc0/zREvVckEHHYWZm5WtuqGuLry5Be3vyjm9I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=JX5EJeao0USI7bQr4zZLOarNEDHm8BgsUgb23kAib/7+7S33S5bCUkar425CFlb2HMw8dAqZ0v9UuEIEyNx9E1UfYADjEFIzQfzLWLdWZcfJ5ys+oYPw0pPaHvU2TFagc+lCjYMwR6uXTJEUR2U26tBfiB9rrH90ePFQCZ7V6Ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD3541042; Tue, 4 Jun 2024 02:33:03 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A50533F762; Tue, 4 Jun 2024 02:32:37 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , James Clark , Ian Rogers , "Liang, Kan" , Nick Terrell , Thomas Richter , Changbin Du , Fangrui Song , "Mateusz Kowalczyk" , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v1 0/6] perf: build: Fix cross compilation Date: Tue, 4 Jun 2024 10:32:17 +0100 Message-Id: <20240604093223.1934236-1-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series fixes cross compilation issues. The first two patches address the package configuration issue. It sets the package path so the compiler can find the architecture's package. The patch 03 sets the Python configuration path and renames the .so to reflect the build target. The last three patches fix the static build failures. Patch 04 is to fix the issue caused by newer version's elfutils, and the last patches fix the building failure for feature detecting binaries. This patch series is tested for building perf on x86_64 host for Arm64 target. Leo Yan (6): perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation perf: build: Append libtraceevent path in PKG_CONFIG_LIBDIR perf: build: Set Python configuration for cross compilation perf: build: Only link libebl.a for old libdw perf: build: Link lib 'lzma' for static build perf: build: Link lib 'zstd' for static build tools/build/feature/Makefile | 42 +++++++++++++++++++++++++++--------- tools/perf/Makefile.config | 25 +++++++++++++++++++-- tools/perf/Makefile.perf | 15 ++++++++++++- 3 files changed, 69 insertions(+), 13 deletions(-) -- 2.34.1