Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp260897lqp; Mon, 10 Jun 2024 03:23:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKkyqm3yW3zSnj9Yex1tRZTuQmSihQlcuAbV1Nemd6kZJ5BDdT6MnnGDCM0v0oCPRbx2n/55n/SAioe8tRdYy9KzgWLw1cqiHchSiF4A== X-Google-Smtp-Source: AGHT+IGHVmM59kYN+poP8QJNTp/PaDYdGL/b/VGaulw//Dhe4Gqdy+xmm+gf12h/dojweNUX9/I1 X-Received: by 2002:a17:90a:fa01:b0:2c3:792:a649 with SMTP id 98e67ed59e1d1-2c30792a75amr1755400a91.2.1718014996259; Mon, 10 Jun 2024 03:23:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718014996; cv=pass; d=google.com; s=arc-20160816; b=p6pD3lqRggw9v7tdRHE7BXca3hn4B4tlk74aYtt5SPfV8+TlJesqEtei1lzEPoWvLk 8ARznKohOgPmcmtVpBMV5rvS2CKbQfqQOYKuGrIpEKIQmZdY6UXrpk2NKpywCbK3nT3x QoKqX2JIpIEsCXDXyH+wqp42d5FN/IH9+XQeRYgQUacUCI2tA2U2SilYE7zeA7H9LHKO /JJ+tThtWLUNKXcb+fD35aHcwA9iF+PeGztOC4TXOdW+6g31dE54NFThtt9EfeaxvYaS 1vMSfuFhSs6aEaCoFLaAIMtHL0NG0RlodgXIAL/BYdtW5qinfJiU+tA1S0fZ1yqVRZPZ rz3A== 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=xEAgJNHfd3CRijWr6PTobbGlCqnNmefSZbIV2oJ+MWI=; fh=HpB/ghQ4qY+yqVacJINdcRXrsaCBAaUbGMhHL4opc+o=; b=OC9LBtmTMOZV0EiTQLhrReyPJoJRYqY1Ewvo1v5QrK8hjE0LQyqVgyeRnyy/CBInqD P8skeGNOffpL65ktrv9Xedvs5Zdq96X4ILY33xBMwBa0vXFfBiEAetPC9nLo12Yjmrft uUjuc5qoOAr646AUhwBLx1lDeE5TSjyGDEqh7AMxgFRulMnQm4TfSGxOYyiC8afkvRWN IHLFa+KzGTPVZp0Xnw15iKn98oG2qvBND+6dEU52zZ4i6zRGXKXLFSfFxnbDCTzIIV4h r3WZqhyC4wg1D/CQ81rEWpNPZASurPKg6Zj3n4IlEMlGxxqhf0m+PlR2NsLxnjPMF50N QFtg==; 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-207968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2c4de19bfsi4302881a91.105.2024.06.10.03.23.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 03:23:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-207968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207968-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 643F5B26F8C for ; Mon, 10 Jun 2024 09:55:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A4F7757FB; Mon, 10 Jun 2024 09:55:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09AEC42AA1; Mon, 10 Jun 2024 09:55:04 +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=1718013307; cv=none; b=VteX5dCQoAMevuUr6FjwUduejQ/eYkMRTlrAb17OKUbTEykRoBUNckSO9PsvD37VZUHTPdK02X/DjS29+aIJW5SveHe3LJzdMzBT4d5N3ounjW4QocMo+3E8UqoY6gUxnfqEtR3kn4nEF5gNrgzf/RZGqZ0Cjgm4kW6ZB0aOpdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718013307; c=relaxed/simple; bh=qv4nrgv/tX8ob6foi0KDq9uLPeb3wRED/tucnkRZlAM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=svc4O4WAl/Ca1fPHCyeOYJdOB94k858Ria41p3ayx2CkcrU83h8W40cuQ5y2DDA3K7d42H7j8Q6KVzD9qg7vobYOUedecFhqRml9sJdt578sJVWgYYEMhV1xcvI/WpwuX21JJYcsKPFpx6/KT1OMJ9BVwvDn3ArdZu8p86aHNao= 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 E549112FC; Mon, 10 Jun 2024 02:55:28 -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 17B673F73B; Mon, 10 Jun 2024 02:55:01 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Nick Terrell , Thomas Richter , Quentin Monnet , Changbin Du , Fangrui Song , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Guilherme Amadio Cc: Leo Yan Subject: [PATCH v2 0/6] perf: build: Fix cross compilation Date: Mon, 10 Jun 2024 10:54:27 +0100 Message-Id: <20240610095433.336295-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 patch sets the package path if the package configuration path is not specified. This helps the compiler to find the architecture's package in a Multiarch system. The patch 02 sets the Python configuration path and renames the .so to The patches 03, 04 and 05 fix the static build failures. The patch 06 adds document for how to cross compile. This patch series is tested for building perf on x86_64 host for Arm64 target. Changes from v1: - Kept the cross-compile-pkg-config if it is available. (Namhyung) - Removed the patch 02 for fixing pkg-config path for libtraceevent, as this will be resolved in Guilherme Amadio's patch "perf build: Use pkg-config for feature check for libtrace{event,fs}". - Added patch 06 for document. Leo Yan (6): perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation 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 perf docs: Document cross compilation tools/build/feature/Makefile | 54 ++++++++++++++++++++++++------ tools/perf/Documentation/Build.txt | 37 ++++++++++++++++++++ tools/perf/Makefile.config | 20 ++++++++++- tools/perf/Makefile.perf | 26 +++++++++++++- 4 files changed, 125 insertions(+), 12 deletions(-) -- 2.34.1