From patchwork Mon Aug 24 18:17:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jugurtha BELKALEM X-Patchwork-Id: 1350596 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=smile-fr.20150623.gappssmtp.com header.i=@smile-fr.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=oyYXX2Ri; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bb0jH6LK3z9sR4 for ; Tue, 25 Aug 2020 04:17:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C077E85EFB; Mon, 24 Aug 2020 18:17:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Ee5CI_ki6H5; Mon, 24 Aug 2020 18:17:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 03B3385EC2; Mon, 24 Aug 2020 18:17:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 68D2D1BF2B7 for ; Mon, 24 Aug 2020 18:17:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 64D7E86C46 for ; Mon, 24 Aug 2020 18:17:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IfXhI6JLlhbJ for ; Mon, 24 Aug 2020 18:17:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by whitealder.osuosl.org (Postfix) with ESMTPS id CA6FD86C34 for ; Mon, 24 Aug 2020 18:17:49 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id y3so9803017wrl.4 for ; Mon, 24 Aug 2020 11:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=boKtTir8fsosrWGrMOu5MewWHdf2qE+E8tzxX89YZLc=; b=oyYXX2Ri6RCld4pAam/VS7sv/FsJQFNZK6PgUxTx3un99dBPee4du62n+1DCSw9y6p 2ZWZaltpCFDnI9JTn1nDO3dPGxXp4b/aCYEWRtOB8X8Wq5fOJyrqoizwNHwXz5hmD4LB B0jQ7yL2W4XpjFpETaysFTDMgsp1BuklLsstI6oX9FF6RsomWFXTOclHa0wVe2ejTPuS BS8n8IpCV0x3xnnQvSmjZiblKWgQswm06+pQ9s0XWkmZMn3mSIHiNMM6jYocdtRz/52o 7+L+SFIIHr13LpjglK8Ca+hwKJcQLWW/RkImPMm9GyQ5GODju3rTrRUDGr4zjSasAepL ZpPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=boKtTir8fsosrWGrMOu5MewWHdf2qE+E8tzxX89YZLc=; b=p6UvLDNuTIbSsGAeWKyQhKuDEaTLr4ePNFgHbZQmQs+7TSRmW1mu0WSrF+1MLoVaSA hVuFq/wNwje7Yc5qYJBupDcjV/YLDc1Ka//3tMxvS/oufqt83NhXAwJ8VyO4x06b6ozL qFhSPgywugwftNFo1+sVoLcNvpIcYN3POd74wkfqxwNScH4CDU18AoxIWCO8SSw2TIbC Dp7noYl1KZkvBnIa/IckCe5bdQDi+hDkxVwc9c7IQ/KjNoQfHQcyL29sgyvRHqk0aBeP OPL744x9qtdG6Hiz0oFrYI8vDwSpUtoAc48xPZ1ZD0m5MyNGNhkdAxWQV2/QiaRVCSu1 iSsg== X-Gm-Message-State: AOAM5301Qt9O4EpOEyXKZy1qJmPOD4+hl/At3CKJWbDDZYOmBMofig8v CzGRIReyDjMAhNBipRq2pRM/t/+BhcKDdA== X-Google-Smtp-Source: ABdhPJwIGutOIFJhxHMiEFjjtgeEO2qtkA0dGtEpb5/Fk01SP/e8MRx8z5afZeHynPmSX26lBnyWMQ== X-Received: by 2002:adf:82ab:: with SMTP id 40mr1414878wrc.56.1598293063790; Mon, 24 Aug 2020 11:17:43 -0700 (PDT) Received: from P-NAN-SUCRE.numericable.fr (122.57.26.93.rev.sfr.net. [93.26.57.122]) by smtp.gmail.com with ESMTPSA id o124sm721776wmb.2.2020.08.24.11.17.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 11:17:42 -0700 (PDT) From: Jugurtha BELKALEM To: buildroot@buildroot.org Date: Mon, 24 Aug 2020 20:17:39 +0200 Message-Id: <20200824181740.12878-1-jugurtha.belkalem@smile.fr> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH 1/2] package/llvm: add BPF backend X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jugurtha BELKALEM , romain.naour@smile.fr MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" bcc is a front-end tool for eBPF : https://github.com/iovisor/bcc/blob/master/README.md. eBPF is the most powerful Linux tracer, and bcc allows to write eBPF scripts in C and PYTHON3. BCC requires enabling LLVM backend BPF support. Signed-off-by: Jugurtha BELKALEM --- package/llvm/Config.in | 6 ++++++ package/llvm/llvm.mk | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/package/llvm/Config.in b/package/llvm/Config.in index 1d21d87..6ec2ffc 100644 --- a/package/llvm/Config.in +++ b/package/llvm/Config.in @@ -47,6 +47,12 @@ config BR2_PACKAGE_LLVM_RTTI https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html +config BR2_PACKAGE_LLVM_BPF + bool "BPF backend" + help + Build BPF target. Select this option if you are going + to install bcc on the target. + endif comment "llvm needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, dynamic library" diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 24d033d..48a2981 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -61,6 +61,11 @@ ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y) LLVM_TARGETS_TO_BUILD += AMDGPU endif +# Build BPF backend +ifeq ($(BR2_PACKAGE_LLVM_BPF),y) +LLVM_TARGETS_TO_BUILD += BPF +endif + # Use native llvm-tblgen from host-llvm (needed for cross-compilation) LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen