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=1795698062; b=MVu/TnRoeCU21va3RMyRm61wm1U/4KBx7qTKEZL7TD4vdrXTfg9zzW5RPp5pmdfRYOmZ em+DFt6sCWXzacO5jtntfMmetiJxn4MroYesMizS4AGO1KN/BUc/j4PRQr+Wbnzkyj5HG FbsiBQy8lswXrH48knzt2zRJIdQyeGY/bAi2bfA3RKhW278zS+L/QVcOgDNmfnh3ez45A GJ0ulRjIeea6mzhX9QCvnAGaVg0hmAUUztRkHrnCRs/YsF50bTu9Xzekx/dKyr17nCa86 fH8LL9xhTgabJuOzoyDeXfyww/xnakJ4bclBhmxXYIQva6VWieAAJkAeWHXW6PyGBgA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795698062; 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=M7VAf9XrB5dbnBclrZEFhNDVWo+kV4nVBU9oXSSgfYWYmvEOGZlg5TRhow/WQ/JleHYz rJfYd2nXo4FTRwYnlje2ywuSmwhkeCPzjlDT6rLTT/MwMAZ+j8W5yiEyL/4TN9L04dYx/ c2Rq4sIj6W8LYixWL4ApuqFC41mdrdE1h62wYBO0MDXmzR73XTztCwrFZDYg2vzs3Zo4T MIuA2gMGk4C51DB5KXYT70ifWpPkONTeXu5tvTFZwGVHpOX3yVPO01HA0TSdAgKxIPu62 pGm+0u7J4DEMkqQn/eYxVdMXGQgsse5ATWkQtE5/AHslsEwyk8W3zIqLojB81xZpKVw== 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=EMl+N+wv; 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 51913606A32A for ; Thu, 26 Nov 2026 13:01:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 51913606A32A 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=EMl+N+wv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795698061; 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=EMl+N+wvHT1HlQqSTXSL9SezgrPMQjdbqdujxqUTFv2xrW9gSZSIE3aIGdK5MSAlFs6Bzl BwGeVsN1ZfXnyepps8sVmlPOvieSj/siIjr54NqfC/5VKTUsY33umtI7sQh8aMo8wXbNvj OWajIRq7+5RfsNYF09xEukJ503g+Jww= 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: linux-kernel@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