From patchwork Sun Dec 15 22:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13908991 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CF101D696; Sun, 15 Dec 2024 22:12: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=1734300763; cv=none; b=LlDtF4uZ8Jktc0yGu9gJKsXSAFgvkFQDOaz3kv9SJMfJoYUSWtDLfGs71THAE9N+DOvCJ89sQTwTJVXU3pLdIileD4XPbkp0ZRyy7j5T0p/bExioBLMCsT6vHNxuawfN9DYRl8pz8tcNbT/yh8l6dqgAILtmzukeUYTqeHRALi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734300763; c=relaxed/simple; bh=pc2uylv1ntsRPEnes+mJCv7XlY/EKoFkSA4uEYWsiec=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FzOJCjbIHECMcc/m0NQrAfjQ/Q6ViqiaGhLub2YpohCQeQevygSz+RruSe0e97e/TYMkQZYJiH7BXF0NcYRX39QATUn15MUK09L4+v4qglyX4s9jx0sby++qqgb6nR9Y4vz/W+Z6LHiik0yEeBMN6ih4U52VgGjtck6ZK9Z0nHY= 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 404DA1424; Sun, 15 Dec 2024 14:13:08 -0800 (PST) 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 BCE6B3F720; Sun, 15 Dec 2024 14:12:36 -0800 (PST) From: Leo Yan To: Arnaldo Carvalho de Melo , Quentin Monnet , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Nick Terrell , Namhyung Kim , Ian Rogers , Adrian Hunter , "Liang, Kan" , James Clark , Guilherme Amadio , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v3 0/3] bpftool: Fix the static linkage failure Date: Sun, 15 Dec 2024 22:12:20 +0000 Message-Id: <20241215221223.293205-1-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This series follows up on the discussion in [1] for fixing the static linkage issue in bpftool. Patch 01 introduces a new feature for libelf-zstd. If this feature is detected, it means the zstd lib is required by libelf. Patch 02 is a minor improvement for linking the zstd lib in the perf. Patch 03 fixes the static build failure by linking the zstd lib when the feature-libelf-zstd is detected. [1] https://lore.kernel.org/linux-perf-users/Z1H9-9xrWM4FBbNI@mini-arch/T/#m2300b127424e9e2ace7da497a20d88534eb6866f Changes from v2: - Refined commit log in patch 01 for recording info that from which libelf version it requires to link libzstd. (Quentin) - Removed to display feature 'libelf-zstd' in bpftool. (Quentin) - Added Test and Ack tags. Thanks all! (Quentin/Jiri/Namhyung/Andrii) Leo Yan (3): tools build: Add feature test for libelf with ZSTD perf: build: Minor improvement for linking libzstd bpftool: Link zstd lib required by libelf tools/bpf/bpftool/Makefile | 7 +++++++ tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 4 ++++ tools/build/feature/test-libelf-zstd.c | 9 +++++++++ tools/perf/Makefile.config | 8 +++++++- 6 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tools/build/feature/test-libelf-zstd.c