From nobody Sun Dec 14 21:34:13 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4FD41D696; Sun, 15 Dec 2024 22:12:51 +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=1734300773; cv=none; b=fPB2Wpab5PDKkB1dc7qAaWXXTqcB7tjMrRHJWk1YQ3VqOPGjyZ/VlNxHeMFgFkl8l/yJL6ob1P+qAFmVNzx4X4bY1pZQ/NM6HYiPiL/clzYG5sNTcAWHyKUWCPUdMsnlT8jks6WUOHHEKpebGxhmeC/zLKgeP3PRfwZ7Sgtg0bI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734300773; c=relaxed/simple; bh=dZfDJtTdFqqAmRX/oX7LMuN1FEkz+Rtb5tsnTgahIMA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rN6swj3MauZNMwgeurupIWt4TCXej11fVIf35+AkrcMvmpY8UstRL5LgBHqlf1zYvItRNMFToPh9h9/5azFPyqJoe8DAGwZQuCU78z6vy1VlLVSSpe4xsn/DtBwtgERRHThweFbAQ/Pgoiap5BXm1RtS+qI1H1OZKjXvPj1aP7Q= 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 4634B1A32; Sun, 15 Dec 2024 14:13:19 -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 BF2003F720; Sun, 15 Dec 2024 14:12:47 -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 3/3] bpftool: Link zstd lib required by libelf Date: Sun, 15 Dec 2024 22:12:23 +0000 Message-Id: <20241215221223.293205-4-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241215221223.293205-1-leo.yan@arm.com> References: <20241215221223.293205-1-leo.yan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the feature libelf-zstd is detected, the zstd lib is required by libelf. Link the zstd lib in this case. Signed-off-by: Leo Yan Tested-by: Namhyung Kim Acked-by: Andrii Nakryiko Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index a4263dfb5e03..dd9f3ec84201 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -106,6 +106,7 @@ FEATURE_TESTS +=3D libbfd-liberty FEATURE_TESTS +=3D libbfd-liberty-z FEATURE_TESTS +=3D disassembler-four-args FEATURE_TESTS +=3D disassembler-init-styled +FEATURE_TESTS +=3D libelf-zstd =20 FEATURE_DISPLAY :=3D clang-bpf-co-re FEATURE_DISPLAY +=3D llvm @@ -132,6 +133,12 @@ endif =20 LIBS =3D $(LIBBPF) -lelf -lz LIBS_BOOTSTRAP =3D $(LIBBPF_BOOTSTRAP) -lelf -lz + +ifeq ($(feature-libelf-zstd),1) +LIBS +=3D -lzstd +LIBS_BOOTSTRAP +=3D -lzstd +endif + ifeq ($(feature-libcap), 1) CFLAGS +=3D -DUSE_LIBCAP LIBS +=3D -lcap --=20 2.34.1