From patchwork Sun Sep 3 18:25:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 809346 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="h7OOTJ34"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xlhJN1Hvfz9sDB for ; Mon, 4 Sep 2017 04:26:28 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752879AbdICS0N (ORCPT ); Sun, 3 Sep 2017 14:26:13 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:35882 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752613AbdICS0K (ORCPT ); Sun, 3 Sep 2017 14:26:10 -0400 Received: by mail-pg0-f53.google.com with SMTP id r133so13087041pgr.3 for ; Sun, 03 Sep 2017 11:26:10 -0700 (PDT) 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=eo7Una5l1fcoG1/lX8LCNxDKIipij+/sLw1xYp+SsZ5HnXeur50evoDGf8dp8o4MUV oMQ7O9M+wyYlf/XDZ3795LH83DIkkpQUGqyCtbF39JZxS6TGhicDycQFble3efj2AjAN Q/79osWRl80tttjuEDyntHKlVr5ceUZdJnkcU7i3iesyT/g3oAhdZo2tzln4soWYgCsx TsfGoqLEQe+bcxQHTOEOz7fh4mJIo1SSzeCkZe0X0lObALVeaNZDXSvTbZr54i0JH8Ts tFYIQkcrt9cHq9BSCtsoZtahQIXXohPBFbrQq85AlhyPQyT7uP0Cv5o3wpdotAS61UQF nZbA== X-Gm-Message-State: AHPjjUgOzymvaBlY5OqO78jx9DgtfJFWNyDHOD+AZblVdPpRjSnJuL9S 5TxZav/68adxw0wE9Po0Lw== 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) Received: from joelaf-glaptop0.roam.corp.google.com (74.sub-70-213-6.myvzw.com. [70.213.6.74]) by smtp.gmail.com with ESMTPSA id p64sm7627440pfi.168.2017.09.03.11.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Sep 2017 11:26:08 -0700 (PDT) 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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