Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1725724

[PATCH RFC v3 4/4] samples/bpf: Add documentation on cross compilation

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Joel Fernandes <joelaf@google.com>
Newsgroups linux.kernel
Subject [PATCH RFC v3 4/4] samples/bpf: Add documentation on cross compilation
Date Sun, 03 Sep 2017 20:30:01 +0200
Message-ID <ulHOF-3lK-9@gated-at.bofh.it> (permalink)
References <ulHOF-3lK-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bh22PkrDdXvH3tuYetlMNT0bvm48TT3gelrmZ1426dM=; b=h7OOTJ34FDEwDZbtHj9YcDoyYISePEXEX1V68kOkCvVK6Gw7Q3zkFIAe9P+grMAz/b tD2zAYdwdzQy6VIIbTKRXRj3wH28g1D1xJSyc0Q8p5G5pXYvRJE4oN4TyclhfU1xCNVt g8I+9KikNtUtf2ee+4H9/HfUqanMMb0fT0MZpWG7OUafrw6moz2YUCohGrNcdJJF5W3D RIfQVEuLG/WFyLtSonOlNkiyJMpPSJ7q+qmldk48cYmGCkNkt/eP1WQl1lTvnxZ9/uAC 8x+PQn2pYrJon3wq5thl54E5V9AtDveRqOqZPDo2qXfTg6pDLKW8Ol2t5y8E+v4o9hzw 2AoQ==
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:in-reply-to :references; bh=Bh22PkrDdXvH3tuYetlMNT0bvm48TT3gelrmZ1426dM=; b=IlFOs6Rd5/NZbaumD68SpcwxAtX/r99UmevRHwFcILS0zJtDXptFIEWcNJQfbsnuAQ wyLHT2CEt+IaKaAjdiM0v/7xzHemfSNr1xehsd89L5w/gJTq9nUWh+UB2DzLFCSjA2l2 8FtrIlm07ENg6FxJmnNv7AS+XXGwUyQNbVe2afkNVBTg0/Dh8qaQCyWCHFLyu1DKTdON 7LC4KQjgX2qpGgH78MXUs0Ky870jX/Lp1GDnuzHahjWhB9FrWdI+DqVN8qa3ef6wUEUH 9O3j3Xzlpg3lzBl7wPIkTcqvqr3RxppIu1F4Fz9YwMtpf1+Y6gMvle3TmkN1Bp8ZS+LL 2Eew==
X-Gm-Message-State AHPjjUjSe4c+Xdbbjc/npewTlWUPK3Y4l3V7HEifRaPLMvEjFvQdwiG1 J0bIn15VmO84VTAkuQowMQ==
X-Google-SMTP-Source ADKCNb41FxGNR7xbAvYCr6QFNfrtyzK8Ua3OB6oFKevtbVx2kEidm8qYgPm62YV5/TZiJU6xo2vinQ==
X-Received by 10.98.212.87 with SMTP id u23mr4934775pfl.95.1504463169346; Sun, 03 Sep 2017 11:26:09 -0700 (PDT)
X-Mailer git-send-email 2.14.1.581.gf28d330327-goog
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 28
Organization linux.* mail to news gateway
X-Original-Cc kernel-team@android.com, Juri Lelli <juri.lelli@arm.com>, Alison Chaiken <alison@she-devel.com>, Chenbo Feng <fengc@google.com>, Joel Fernandes <joelaf@google.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, David Miller <davem@davemloft.net>
X-Original-Date Sun, 3 Sep 2017 11:25:49 -0700
X-Original-Message-ID <20170903182549.30866-4-joelaf@google.com>
X-Original-References <20170903182549.30866-1-joelaf@google.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1725724

Show key headers only | View raw


CC: Alexei Starovoitov <ast@kernel.org>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: David Miller <davem@davemloft.net>
Signed-off-by: Joel Fernandes <joelaf@google.com>
---
 samples/bpf/README.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst
index 79f9a58f1872..2b906127ef54 100644
--- a/samples/bpf/README.rst
+++ b/samples/bpf/README.rst
@@ -64,3 +64,13 @@ It is also possible to point make to the newly compiled 'llc' or
 'clang' command via redefining LLC or CLANG on the make command line::
 
  make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
+
+Cross compiling samples
+-----------------------
+Inorder to cross-compile, say for arm64 targets, export CROSS_COMPILE and ARCH
+environment variables before calling make. This will direct make to build
+samples for the cross target.
+
+export ARCH=arm64
+export CROSS_COMPILE="aarch64-linux-gnu-"
+make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
-- 
2.14.1.581.gf28d330327-goog

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH RFC v3 4/4] samples/bpf: Add documentation on cross compilation Joel Fernandes <joelaf@google.com> - 2017-09-03 20:30 +0200

csiph-web