From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gavin.hu@arm.com>
Received: from foss.arm.com (foss.arm.com [217.140.101.70])
 by dpdk.org (Postfix) with ESMTP id 8707D4C99;
 Tue, 14 Aug 2018 18:18:56 +0200 (CEST)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A0C1018A;
 Tue, 14 Aug 2018 09:18:55 -0700 (PDT)
Received: from net-x86-supermicro-01.shanghai.arm.com
 (net-x86-supermicro-01.shanghai.arm.com [10.169.41.35])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D086A3F5BD;
 Tue, 14 Aug 2018 09:18:54 -0700 (PDT)
From: Gavin Hu <gavin.hu@arm.com>
To: dev@dpdk.org
Cc: gavin.hu@arm.com,
	Honnappa.Nagarahalli@arm.com,
	stable@dpdk.org
Date: Wed, 15 Aug 2018 00:18:34 +0800
Message-Id: <1534263514-9816-1-git-send-email-gavin.hu@arm.com>
X-Mailer: git-send-email 2.7.4
Subject: [dpdk-stable] [PATCH] doc: add cross compile part for sample
	applications
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2018 16:18:57 -0000

Fixes: 7cacb05655 ("doc: add generic build instructions for sample apps")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 doc/guides/sample_app_ug/compiling.rst | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/compiling.rst b/doc/guides/sample_app_ug/compiling.rst
index a2d75ed..c8cf1bd 100644
--- a/doc/guides/sample_app_ug/compiling.rst
+++ b/doc/guides/sample_app_ug/compiling.rst
@@ -9,7 +9,6 @@ This section explains how to compile the DPDK sample applications.
 To compile all the sample applications
 --------------------------------------
 
-
 Set the path to DPDK source code if its not set:
 
     .. code-block:: console
@@ -93,3 +92,18 @@ Build the application:
 
         export RTE_TARGET=build
         make
+
+To cross compile the sample application(s)
+------------------------------------------
+
+For cross compiling the sample application(s), please append 'CC=$(CROSS_COMPILER)' to the 'make' command.
+For example:
+
+    .. code-block:: console
+
+        export RTE_TARGET=build
+        export RTE_SDK=/path/to/rte_sdk
+        export CROSS_COMPILER=aarch64-linux-gnu-gcc
+        make -C examples CC=$(CROSS_COMPILER)
+               or
+        make CC=$(CROSS_COMPILER)
-- 
2.7.4