Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1027103pxb; Fri, 15 Apr 2022 18:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzILikzJFV/MJjpOXnzOIJZaMpBZMnOwoCrCeq/ETQQq2jUR0TjkeK3K0RjhE+3Hlkb2BJ X-Received: by 2002:a65:4789:0:b0:3a2:4866:dc48 with SMTP id e9-20020a654789000000b003a24866dc48mr1327937pgs.87.1650073762304; Fri, 15 Apr 2022 18:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073762; cv=none; d=google.com; s=arc-20160816; b=GwDJdQu2n/aZQiMTpAm7xktwuGrWxqNRNb20+H8hi+swDeE9Wv7U4vnOCmIbOsnFr0 tk2AKknP9Z3z8NbMi8Zssl+FA/3dQEu+3maYAnvvQVOE5zRVwLIIDtQ2M7lLb6hu1lyd dJ+nuOvzGXn7+p+h4+wn7RVRmILavS+7GzBM8H530ADQEmCOL5q8wNX8vDv0MQNF6MmX p1Y2ca2R46z3zdh+A3JLYJ3NR/LvrFMgiFbqO8oICLP/lNLiFfQuyb5QxAljdfFVi9Dw 8kzu/cqyVQ43JmTaLMjWenvLTBUsaZW9d2r1A/lA72VFzFSNVaZQbXP2VmNwrDeQXicO Lbqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=4UBxbz5wf4h5VLr17g7++AvyCOaKrTuecaQ7HkJeJ4c=; b=OUG0Vm8vG89SIZTz6W1GA4Xw8BKF6uMafUC8lbwaJ2iTyHmd9XyZNsLZu4syxaam08 alpoWClEFpZu3YPWe3hjG4RPpCmKeTUW6bHJEOjGGS9j3sjk/xDwmeneDQM4Kr4WbDlo MiTPYLQOFI15siZH67XftzSivfEXwxyI0umcLUIs6JUgWir4QTcCxPyPDC77bEGEI6MQ j8TyCKr0UG8eIRunRqmH/A4vgeO8fPmTrCu/kliUNB5v/fmkPAdw4BIm/NpUcfuJOf3Z oAm5Q6enXDFQRni/qbwizSubb46TatGoHGLGg4ekUGI+Oymc4OE+k69HGAygIErz7pq/ R5KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=MooR0+CE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id hk3-20020a17090b224300b001cd6a811925si3379464pjb.48.2022.04.15.18.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:49:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail2 header.b=MooR0+CE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94FBB18597F; Fri, 15 Apr 2022 18:11:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347263AbiDNWsh (ORCPT + 99 others); Thu, 14 Apr 2022 18:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347256AbiDNWsb (ORCPT ); Thu, 14 Apr 2022 18:48:31 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1704FC6EFD; Thu, 14 Apr 2022 15:45:59 -0700 (PDT) Date: Thu, 14 Apr 2022 22:45:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail2; t=1649976355; bh=4UBxbz5wf4h5VLr17g7++AvyCOaKrTuecaQ7HkJeJ4c=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=MooR0+CEAV4XbA72GQZXTEX0qrP/7bHt4An7MuN15EsMiCeJbogR0SuNVdOa0OE6z i5+DpHyyLJJ93Op7sWb/op+qLU0EmssLRgsQvozEzp9XCuYj6OxIshSNSU9RqC/0Oh rUaMn5VIHKUuG4Vr7yn/ye0MEfT3ZHK0QwLU+Z3HP7UjnJLtV8rbSCsNs2o9lknyl3 zDaxvV7foY/Do1y9UGcYfDuYlthxRsfNMA15DpXT7vIEl4izRnpnOpeCivqxQ1q0Ma f68vfMrSc7K+gHtcmWUFMHgeMGPcdlBaL1OiaRrmvwFuNffHMfOdFLnVH4nCscDzqr +qg809I6lI6qQ== To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko From: Alexander Lobakin Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , =?utf-8?Q?Bj=C3=B6rn_T=C3=B6pel?= , Magnus Karlsson , Jonathan Lemon , Nathan Chancellor , Nick Desaulniers , Alexander Lobakin , Dmitrii Dolgov <9erthalion6@gmail.com>, Quentin Monnet , Tiezhu Yang , Kumar Kartikeya Dwivedi , Chenbo Feng , Willem de Bruijn , Daniel Wagner , Thomas Graf , Ong Boon Leong , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Reply-To: Alexander Lobakin Subject: [PATCH bpf-next 05/11] samples: bpf: use host bpftool to generate vmlinux.h, not target Message-ID: <20220414223704.341028-6-alobakin@pm.me> In-Reply-To: <20220414223704.341028-1-alobakin@pm.me> References: <20220414223704.341028-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the host build of bpftool (bootstrap) instead of the target one to generate vmlinux.h/skeletons for the BPF samples. Otherwise, when host !=3D target, samples compilation fails with: /bin/sh: line 1: samples/bpf/bpftool/bpftool: failed to exec: Exec format error Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support") Signed-off-by: Alexander Lobakin --- samples/bpf/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 97203c0de252..02f999a8ef84 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -291,12 +291,13 @@ $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_S= RC)/Makefile) | $(LIBBPF_OU BPFTOOLDIR :=3D $(TOOLS_PATH)/bpf/bpftool BPFTOOL_OUTPUT :=3D $(abspath $(BPF_SAMPLES_PATH))/bpftool -BPFTOOL :=3D $(BPFTOOL_OUTPUT)/bpftool +BPFTOOL :=3D $(BPFTOOL_OUTPUT)/bootstrap/bpftool $(BPFTOOL): $(LIBBPF) $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefi= le) | $(BPFTOOL_OUTPUT) =09 $(MAKE) -C $(BPFTOOLDIR) srctree=3D$(BPF_SAMPLES_PATH)/../../ \ =09=09OUTPUT=3D$(BPFTOOL_OUTPUT)/ \ =09=09LIBBPF_OUTPUT=3D$(LIBBPF_OUTPUT)/ \ -=09=09LIBBPF_DESTDIR=3D$(LIBBPF_DESTDIR)/ +=09=09LIBBPF_DESTDIR=3D$(LIBBPF_DESTDIR)/ \ +=09=09bootstrap $(LIBBPF_OUTPUT) $(BPFTOOL_OUTPUT): =09$(call msg,MKDIR,$@) -- 2.35.2