Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922AbdICS0N (ORCPT ); Sun, 3 Sep 2017 14:26:13 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:34874 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbdICS0K (ORCPT ); Sun, 3 Sep 2017 14:26:10 -0400 X-Google-Smtp-Source: ADKCNb41FxGNR7xbAvYCr6QFNfrtyzK8Ua3OB6oFKevtbVx2kEidm8qYgPm62YV5/TZiJU6xo2vinQ== From: Joel Fernandes To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: kernel-team@android.com, Juri Lelli , Alison Chaiken , Chenbo Feng , Joel Fernandes , Alexei Starovoitov , Daniel Borkmann , David Miller Subject: [PATCH RFC v3 4/4] samples/bpf: Add documentation on cross compilation Date: Sun, 3 Sep 2017 11:25:49 -0700 Message-Id: <20170903182549.30866-4-joelaf@google.com> X-Mailer: git-send-email 2.14.1.581.gf28d330327-goog In-Reply-To: <20170903182549.30866-1-joelaf@google.com> References: <20170903182549.30866-1-joelaf@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 28 CC: Alexei Starovoitov CC: Daniel Borkmann CC: David Miller Signed-off-by: Joel Fernandes --- 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