From patchwork Wed Dec 11 09:31:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13903269 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA5E14C97; Wed, 11 Dec 2024 09:31:26 +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=1733909489; cv=none; b=jF8aolgPXGhrA8Kk2REcVI1rRAsSUH8hUJfXtm3uNzKHW2CfYWsx8ZNrujrhHRhFomGgEi8trJ0ecJOyhTPKMYTANo99T3zAh9U1LEnkCzKMVBXpVy4Dnu1y07uZ6gxJ7dCpFHRXwTFPPpZ/aFd9dJv9n4r/CDQCuF3DdTorZSQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733909489; c=relaxed/simple; bh=9S1xfuxm6ad8QaPLlRfK0CECrSiQWiO9S5j/PlfvJhQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YB61luEaq2iFLRjvAkHuTO674mKB5N6g2xCgm3LWxK1QGiMrtOIhMpZf+NoqzA++zHh41xsFG4pso1q6WfLQ8iFD9JUQ2wnVuSD/7KCcefXlO9DSS8dzoEXM1KgY8FLFslwZDKXRKwboFU2ZbXdFdj+YZXDbnIhirVQiOzWfGh0= 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 CEDA31063; Wed, 11 Dec 2024 01:31:53 -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 5A3F43F5A1; Wed, 11 Dec 2024 01:31:22 -0800 (PST) From: Leo Yan To: Quentin Monnet , Arnaldo Carvalho de Melo , Namhyung Kim , 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 , 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 v2 0/3] bpftool: Fix the static linkage failure Date: Wed, 11 Dec 2024 09:31:11 +0000 Message-Id: <20241211093114.263742-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 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 | 8 ++++++++ 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, 33 insertions(+), 1 deletion(-) create mode 100644 tools/build/feature/test-libelf-zstd.c Tested-by: Namhyung Kim Acked-by: Andrii Nakryiko