From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795698064; b=IE5IkP8T9y3+baS5ch5xrR5Dp77TekVa8Ic15qdymkLgMWTURQojPlbjLQz08MGJ87tc J/gMOJPtD7tXhL0qM2tTEnhx/7m0EEONKIX7JiZ+KIjskb0k7apksAiL4bzX1QsPMQm+R 23L44uodeT8k5EQs+II+O+NVYpMOk0GjxAjDfKnEVrC4qmAHEZQvcbSSxUE6y4JKSuet2 MHKCMjjq/KRCK4ebTeSvQl6+3S7JgrfCPBr+OiCSy/hLchcfnDHIyQeCxfXq26jgmAUlz 323u4zD/JUs//HdMQ0g5c7B5ji5Z9R/q62ioskpfIxb9R2QJ+XOEmYux7gswHCkeFFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795698064; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=2TuYN3pP/IAzKqWS/FNEppG7GioCEjQUwDIqKAyfFfU=; b=1ykxnn1LlaANFOMLFm8pyOr/eRcOo8kkfeQsWF6kiN0LvWSxfswI9oK+q26GeYzQVF4l ZyfUphRTdwfC4/e33aiiZ3eUkXTzMvtxdwglR+OHbps++wLrH+p3dgH7tp32C4cRV/rOr mbIj+XdlGZLNS1dSR+NsinnY5uCoEfxingQY8fJKW25QSk/BoePVGx0/b9H3qtUmSiLUE 6XIBJ9FQmJGhvY10Pf5CVSAao4IIbCjkWkFsK8qYf20SMUu6wV1Xo51QIPz9VyVmjSBJV c8HPNWlkJmsBpwPQAl+oLTahue0ZjjiYhmiK11Y8YppO2uhZHlWgDyFnLtSDyY3mL7w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YKCGj0RK; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22E37606A330 for ; Thu, 26 Nov 2026 13:01:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 22E37606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YKCGj0RK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795698062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2TuYN3pP/IAzKqWS/FNEppG7GioCEjQUwDIqKAyfFfU=; b=YKCGj0RKdK0c0VeBMpAbJJ0qe+L8SYjx05ea0l4nS2XupUEWVJb1KlQPQVxMfuAEz/DKXw dhiGXPteQsvXmhlZx/uFrBg/8s4LCFBRJBzCuw/FUUW0T2ADYX0llntxWd1TIlL/p8U4GX hNWekQb8Q3gY4WrhqYNzs1/4RJm63DI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-VEPcXDOpOhuyzlggLXn4Vw-1; Thu, 26 Nov 2026 13:00:57 +0000 X-MC-Unique: VEPcXDOpOhuyzlggLXn4Vw-1 X-Mimecast-MFC-AGG-ID: VEPcXDOpOhuyzlggLXn4Vw_1795698055 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4ECBE1800651; Thu, 26 Nov 2026 13:00:55 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 317CB1800543; Thu, 26 Nov 2026 13:00:51 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: Gabriele Monaco , Steven Rostedt , Alexei Starovoitov , Nam Cao , Wen Yang , Tobias Schaffner , Viktor Malik , Peter Zijlstra , John Ogness Subject: [PATCH v3 06/18] tools/build: Add a feature test for bpftool-btf Date: Thu, 26 Nov 2026 13:59:52 +0100 Message-ID: <20261126130004.127155-7-gmonaco@redhat.com> In-Reply-To: <20261126130004.127155-1-gmonaco@redhat.com> References: <20261126130004.127155-1-gmonaco@redhat.com> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 RV can run bpf monitors and also build them, only the latter requires the vmlinux.h from bpftool btf. Add a feature so that RV can be built with BPF support without having to build in-tree BPF monitors if not supported on the system. Signed-off-by: Gabriele Monaco --- tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index c010049d9720..79e08fc62bb5 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -129,6 +129,7 @@ FEATURE_TESTS_EXTRA := \ libdebuginfod \ clang-bpf-co-re \ bpftool-skeletons \ + bpftool-btf \ libunwind \ libunwind-debug-frame \ $(foreach arch,$(LIBUNWIND_ARCHS),libunwind-$(arch) libunwind-debug-frame-$(arch)) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 359da8b98bc5..e021846fb662 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -71,7 +71,8 @@ FILES= \ test-libpfm4.bin \ test-rust.bin \ test-libopenssl.bin \ - test-bpftool-skeletons.bin + test-bpftool-skeletons.bin \ + test-bpftool-btf.bin FILES := $(addprefix $(OUTPUT),$(FILES)) @@ -370,6 +371,10 @@ $(OUTPUT)test-bpftool-skeletons.bin: { $(SYSTEM_BPFTOOL) version | grep '^features:.*skeletons'; } \ > $(@:.bin=.make.output) 2>&1 && touch $@ +$(OUTPUT)test-bpftool-btf.bin: + $(SYSTEM_BPFTOOL) btf help \ + > $(@:.bin=.make.output) 2>&1 && touch $@ + # Testing Rust is special: we don't compile anything, it's enough to check the # compiler presence. Compiling a test code for this purposes is problematic, # because Rust will emit a dependency file without any external references, -- 2.56.1