From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 558BBA0093; Tue, 7 Dec 2021 12:05:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C269F41C3D; Tue, 7 Dec 2021 12:05:14 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 256484114F for ; Tue, 7 Dec 2021 12:05:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id BFD471342BB; Tue, 7 Dec 2021 12:05:11 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G1tr_ZwJrklL; Tue, 7 Dec 2021 12:05:10 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 376E91342B6; Tue, 7 Dec 2021 12:05:10 +0100 (CET) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Date: Tue, 7 Dec 2021 12:05:06 +0100 Message-Id: <1638875109-5544-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1638875109-5544-1-git-send-email-juraj.linkes@pantheon.tech> References: <1637229656-21612-1-git-send-email-juraj.linkes@pantheon.tech> <1638875109-5544-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove CFLAGS and LDFLAGS since Meson doesn't support them well enough. Add Meson alternatives: -Dc_args and -Dc_link_args on the command line and in cross files. Signed-off-by: Juraj Linkeš --- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst index d59af58235..51075bd4a9 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -98,10 +98,6 @@ For aarch32:: Augment the GNU toolchain with NUMA support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. note:: - - This way is optional, an alternative is to use extra CFLAGS and LDFLAGS. - Copy the NUMA header files and lib to the cross compiler's directories: .. code-block:: console @@ -110,6 +106,27 @@ Copy the NUMA header files and lib to the cross compiler's directories: cp /lib/libnuma.a /gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/9.2.1/ cp /lib/libnuma.so /gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/9.2.1/ +.. note:: + + Using LDFLAGS and CFLAGS is not a viable alternative to copying the files. + The Meson docs say it is not recommended, as there are many caveats to their + use with Meson, especially when rebuilding the project. A viable alternative + would be to use the ``c_args`` and ``c_link_args`` options with Meson 0.51.0 + and higher: + +.. code-block:: console + + -Dc_args=-I/include -Dc_link_args=-L/lib + + For Meson versions lower than 0.51.0, the ``c_args`` and ``c_link_args`` + options don't apply to cross compilation. However, the compiler/linker flags + may be added to cross files under [properties]: + +.. code-block:: console + + c_args = ['-I/include'] + c_link_args = ['-L/lib'] + Cross Compiling DPDK with GNU toolchain using Meson ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.20.1