DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] doc: arm64 cross docs improvements/fixes
@ 2021-11-18 10:00 Juraj Linkeš
  2021-11-26 13:53 ` Thomas Monjalon
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
  0 siblings, 2 replies; 18+ messages in thread
From: Juraj Linkeš @ 2021-11-18 10:00 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, Honnappa.Nagarahalli,
	Ruifeng.Wang, ferruh.yigit
  Cc: dev, Juraj Linkeš

Numactl cross compilation doesn't work with clang, remove it and fix the
gcc cross compiler executable name.

Remove CFLAGS and LDFLAGS since Meson doesn't support them well enough.
Add alternatives.

The names of the downloaded gcc binaries differ from those in cross
files, so point this out in docs.

Fixes: eb0e12c0c299 ("doc: add clang to aarch64 cross build guide")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
Let me know if I should split the patch.
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 69 ++++++++++++++++---
 1 file changed, 60 insertions(+), 9 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..71f3f6c878 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -35,13 +35,14 @@ NUMA is required by most modern machines, not needed for non-NUMA architectures.
    git checkout v2.0.13 -b v2.0.13
    ./autogen.sh
    autoconf -i
-   ./configure --host=aarch64-linux-gnu CC=<compiler> --prefix=<numa install dir>
+   ./configure --host=aarch64-linux-gnu CC=aarch64-none-linux-gnu-gcc--prefix=<numa install dir>
    make install
 
 .. note::
 
-   The compiler above can be either aarch64-linux-gnu-gcc or clang.
-   See below for information on how to get specific compilers.
+   The compiler is aarch64-none-linux-gnu-gcc if you download gcc using the
+   below guide. If you're using a different compiler, make sure you're using
+   the proper executable name.
 
 The numa header files and lib file is generated in the include and lib folder
 respectively under ``<numa install dir>``.
@@ -98,10 +99,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,9 +107,62 @@ Copy the NUMA header files and lib to the cross compiler's directories:
    cp <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/9.2.1/
    cp <numa_install_dir>/lib/libnuma.so <cross_install_dir>/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<numa_install_dir>/include -Dc_link_args=-L<numa_install_dir>/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<numa_install_dir>/include']
+   c_link_args = ['-L<numa_install_dir>/lib']
+
 Cross Compiling DPDK with GNU toolchain using Meson
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+.. note::
+
+   The names of gcc binaries in cross files differ from the downloaded
+   ones, which have an extra "-none-" in their name. Please modify the cross
+   file binaries accordingly when using the downloaded cross compilers.
+
+   A example cross file with modified names and added numa paths would look
+   like this:
+
+.. code-block:: console
+
+   [binaries]
+   c = 'aarch64-none-linux-gnu-gcc'
+   cpp = 'aarch64-none-linux-gnu-cpp'
+   ar = 'aarch64-none-linux-gnu-gcc-ar'
+   strip = 'aarch64-none-linux-gnu-strip'
+   pkgconfig = 'aarch64-linux-gnu-pkg-config' # the downloaded binaries
+      # don't contain a pkgconfig binary, so it's not modified
+   pcap-config = ''
+
+   [host_machine]
+   system = 'linux'
+   cpu_family = 'aarch64'
+   cpu = 'armv8-a'
+   endian = 'little'
+
+   [properties]
+   # Generate binaries that are portable across all Armv8 machines
+   platform = 'generic'
+   c_args = ['-I<numa_install_dir>/include']  # replace <numa_install_dir>
+   c_link_args = ['-L<numa_install_dir>/lib'] # with your path
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
@@ -120,12 +170,13 @@ command::
    ninja -C cross-build
 
 For example if the target machine is aarch64 we can use the following
-command::
+command, provided the cross file has been modified accordingly::
 
    meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
    ninja -C aarch64-build-gcc
 
-If the target machine is aarch32 we can use the following command::
+If the target machine is aarch32 we can use the following command, provided
+the cross file has been modified accordingly::
 
    meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc
    ninja -C aarch32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1] doc: arm64 cross docs improvements/fixes
  2021-11-18 10:00 [PATCH v1] doc: arm64 cross docs improvements/fixes Juraj Linkeš
@ 2021-11-26 13:53 ` Thomas Monjalon
  2021-11-26 14:17   ` Juraj Linkeš
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
  1 sibling, 1 reply; 18+ messages in thread
From: Thomas Monjalon @ 2021-11-26 13:53 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: david.marchand, bruce.richardson, Honnappa.Nagarahalli,
	Ruifeng.Wang, ferruh.yigit, dev

18/11/2021 11:00, Juraj Linkeš:
> Numactl cross compilation doesn't work with clang, remove it and fix the
> gcc cross compiler executable name.
> 
> Remove CFLAGS and LDFLAGS since Meson doesn't support them well enough.
> Add alternatives.
> 
> The names of the downloaded gcc binaries differ from those in cross
> files, so point this out in docs.
> 
> Fixes: eb0e12c0c299 ("doc: add clang to aarch64 cross build guide")
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
> Let me know if I should split the patch.

Yes, there are many things to discuss and review.
Please split each concern in its own patch.
Anyway I cannot merge such patch without an Arm maintainer review.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH v1] doc: arm64 cross docs improvements/fixes
  2021-11-26 13:53 ` Thomas Monjalon
@ 2021-11-26 14:17   ` Juraj Linkeš
  0 siblings, 0 replies; 18+ messages in thread
From: Juraj Linkeš @ 2021-11-26 14:17 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: david.marchand, bruce.richardson, Honnappa.Nagarahalli,
	Ruifeng.Wang, ferruh.yigit, dev



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, November 26, 2021 2:54 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: david.marchand@redhat.com; bruce.richardson@intel.com;
> Honnappa.Nagarahalli@arm.com; Ruifeng.Wang@arm.com;
> ferruh.yigit@intel.com; dev@dpdk.org
> Subject: Re: [PATCH v1] doc: arm64 cross docs improvements/fixes
> 
> 18/11/2021 11:00, Juraj Linkeš:
> > Numactl cross compilation doesn't work with clang, remove it and fix
> > the gcc cross compiler executable name.
> >
> > Remove CFLAGS and LDFLAGS since Meson doesn't support them well enough.
> > Add alternatives.
> >
> > The names of the downloaded gcc binaries differ from those in cross
> > files, so point this out in docs.
> >
> > Fixes: eb0e12c0c299 ("doc: add clang to aarch64 cross build guide")
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> > Let me know if I should split the patch.
> 
> Yes, there are many things to discuss and review.
> Please split each concern in its own patch.

Will do.

> Anyway I cannot merge such patch without an Arm maintainer review.
> 

Ok, I'll notify arm folks when I send the new version.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 0/4] arm64 cross docs improvements/fixes
  2021-11-18 10:00 [PATCH v1] doc: arm64 cross docs improvements/fixes Juraj Linkeš
  2021-11-26 13:53 ` Thomas Monjalon
@ 2021-12-07 11:05 ` Juraj Linkeš
  2021-12-07 11:05   ` [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
                     ` (4 more replies)
  1 sibling, 5 replies; 18+ messages in thread
From: Juraj Linkeš @ 2021-12-07 11:05 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The docs are a big outdated and in need of updates.

Using CFLAGS and LDFLAGS is an artefact the old build system, Meson
doesn't support those well.

Numaclt can't be cross compiled with clang.

The names of downloaded binaried have an extra -none- in them.

And to make these changes more easily understandable, add an example
cross file.

Juraj Linkeš (4):
  doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  doc: arm64 cross build binary names update
  doc: arm64 cross build numactl compilers
  docs: add an example arm64 cross file

 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 69 ++++++++++++++++---
 1 file changed, 60 insertions(+), 9 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
@ 2021-12-07 11:05   ` Juraj Linkeš
  2021-12-15  8:00     ` Ruifeng Wang
  2021-12-07 11:05   ` [PATCH v2 2/4] doc: arm64 cross build binary names update Juraj Linkeš
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Juraj Linkeš @ 2021-12-07 11:05 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

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š <juraj.linkes@pantheon.tech>
---
 .../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 <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/9.2.1/
    cp <numa_install_dir>/lib/libnuma.so <cross_install_dir>/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<numa_install_dir>/include -Dc_link_args=-L<numa_install_dir>/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<numa_install_dir>/include']
+   c_link_args = ['-L<numa_install_dir>/lib']
+
 Cross Compiling DPDK with GNU toolchain using Meson
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 2/4] doc: arm64 cross build binary names update
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
  2021-12-07 11:05   ` [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
@ 2021-12-07 11:05   ` Juraj Linkeš
  2021-12-15  8:02     ` Ruifeng Wang
  2021-12-07 11:05   ` [PATCH v2 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Juraj Linkeš @ 2021-12-07 11:05 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The newer version have an extra -none- in the name.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 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 51075bd4a9..af159bbf93 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -130,6 +130,12 @@ Copy the NUMA header files and lib to the cross compiler's directories:
 Cross Compiling DPDK with GNU toolchain using Meson
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+.. note::
+
+   The names of gcc binaries in cross files differ from the downloaded
+   ones, which have an extra "-none-" in their name. Please modify the cross
+   file binaries accordingly when using the downloaded cross compilers.
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
@@ -137,12 +143,13 @@ command::
    ninja -C cross-build
 
 For example if the target machine is aarch64 we can use the following
-command::
+command, provided the cross file has been modified accordingly::
 
    meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
    ninja -C aarch64-build-gcc
 
-If the target machine is aarch32 we can use the following command::
+If the target machine is aarch32 we can use the following command, provided
+the cross file has been modified accordingly::
 
    meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc
    ninja -C aarch32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 3/4] doc: arm64 cross build numactl compilers
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
  2021-12-07 11:05   ` [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
  2021-12-07 11:05   ` [PATCH v2 2/4] doc: arm64 cross build binary names update Juraj Linkeš
@ 2021-12-07 11:05   ` Juraj Linkeš
  2021-12-15  8:38     ` Ruifeng Wang
  2021-12-07 11:05   ` [PATCH v2 4/4] docs: add an example arm64 cross file Juraj Linkeš
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
  4 siblings, 1 reply; 18+ messages in thread
From: Juraj Linkeš @ 2021-12-07 11:05 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

Numactl cross compilation doesn't work with clang, remove it and fix the
gcc cross compiler executable name.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 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 af159bbf93..6153bc5b77 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -35,13 +35,14 @@ NUMA is required by most modern machines, not needed for non-NUMA architectures.
    git checkout v2.0.13 -b v2.0.13
    ./autogen.sh
    autoconf -i
-   ./configure --host=aarch64-linux-gnu CC=<compiler> --prefix=<numa install dir>
+   ./configure --host=aarch64-linux-gnu CC=aarch64-none-linux-gnu-gcc --prefix=<numa install dir>
    make install
 
 .. note::
 
-   The compiler above can be either aarch64-linux-gnu-gcc or clang.
-   See below for information on how to get specific compilers.
+   The compiler is aarch64-none-linux-gnu-gcc if you download gcc using the
+   below guide. If you're using a different compiler, make sure you're using
+   the proper executable name.
 
 The numa header files and lib file is generated in the include and lib folder
 respectively under ``<numa install dir>``.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 4/4] docs: add an example arm64 cross file
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
                     ` (2 preceding siblings ...)
  2021-12-07 11:05   ` [PATCH v2 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
@ 2021-12-07 11:05   ` Juraj Linkeš
  2021-12-15  8:59     ` Ruifeng Wang
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
  4 siblings, 1 reply; 18+ messages in thread
From: Juraj Linkeš @ 2021-12-07 11:05 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The docs mention modifications and additions to the cross file, but
there is no demonstration of how those should look like.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

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 6153bc5b77..78bf19882e 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -137,6 +137,32 @@ Cross Compiling DPDK with GNU toolchain using Meson
    ones, which have an extra "-none-" in their name. Please modify the cross
    file binaries accordingly when using the downloaded cross compilers.
 
+   An example cross file with modified names and added numa paths would look
+   like this:
+
+.. code-block:: console
+
+   [binaries]
+   c = 'aarch64-none-linux-gnu-gcc'
+   cpp = 'aarch64-none-linux-gnu-cpp'
+   ar = 'aarch64-none-linux-gnu-gcc-ar'
+   strip = 'aarch64-none-linux-gnu-strip'
+   pkgconfig = 'aarch64-linux-gnu-pkg-config' # the downloaded binaries
+      # don't contain a pkgconfig binary, so it's not modified
+   pcap-config = ''
+
+   [host_machine]
+   system = 'linux'
+   cpu_family = 'aarch64'
+   cpu = 'armv8-a'
+   endian = 'little'
+
+   [properties]
+   # Generate binaries that are portable across all Armv8 machines
+   platform = 'generic'
+   c_args = ['-I<numa_install_dir>/include']  # replace <numa_install_dir>
+   c_link_args = ['-L<numa_install_dir>/lib'] # with your path
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  2021-12-07 11:05   ` [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
@ 2021-12-15  8:00     ` Ruifeng Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Ruifeng Wang @ 2021-12-15  8:00 UTC (permalink / raw)
  To: Juraj Linkeš,
	thomas, david.marchand, Honnappa Nagarahalli, ferruh.yigit,
	jerinjacobk
  Cc: dev, nd

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Tuesday, December 7, 2021 7:05 PM
> To: thomas@monjalon.net; david.marchand@redhat.com; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; ferruh.yigit@intel.com; jerinjacobk@gmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives
> 
> 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š <juraj.linkes@pantheon.tech>
> ---
>  .../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 <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-9.2-
> 2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-
> gnu/9.2.1/
>     cp <numa_install_dir>/lib/libnuma.so <cross_install_dir>/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<numa_install_dir>/include
> + -Dc_link_args=-L<numa_install_dir>/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]:
These 3 lines need no indent, otherwise they will be rendered in code-block.
With suggested change:
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

> +
> +.. code-block:: console
> +
> +   c_args = ['-I<numa_install_dir>/include']
> +   c_link_args = ['-L<numa_install_dir>/lib']
> +
>  Cross Compiling DPDK with GNU toolchain using Meson
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH v2 2/4] doc: arm64 cross build binary names update
  2021-12-07 11:05   ` [PATCH v2 2/4] doc: arm64 cross build binary names update Juraj Linkeš
@ 2021-12-15  8:02     ` Ruifeng Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Ruifeng Wang @ 2021-12-15  8:02 UTC (permalink / raw)
  To: Juraj Linkeš,
	thomas, david.marchand, Honnappa Nagarahalli, ferruh.yigit,
	jerinjacobk
  Cc: dev, nd

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Tuesday, December 7, 2021 7:05 PM
> To: thomas@monjalon.net; david.marchand@redhat.com; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; ferruh.yigit@intel.com; jerinjacobk@gmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v2 2/4] doc: arm64 cross build binary names update
> 
> The newer version have an extra -none- in the name.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 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 51075bd4a9..af159bbf93 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -130,6 +130,12 @@ Copy the NUMA header files and lib to the cross
> compiler's directories:
>  Cross Compiling DPDK with GNU toolchain using Meson
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> +.. note::
> +
> +   The names of gcc binaries in cross files differ from the downloaded
> +   ones, which have an extra "-none-" in their name. Please modify the cross
> +   file binaries accordingly when using the downloaded cross compilers.
> +
>  To cross-compile DPDK on a desired target machine we can use the following
>  command::
> 
> @@ -137,12 +143,13 @@ command::
>     ninja -C cross-build
> 
>  For example if the target machine is aarch64 we can use the following
> -command::
> +command, provided the cross file has been modified accordingly::
> 
>     meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
>     ninja -C aarch64-build-gcc
> 
> -If the target machine is aarch32 we can use the following command::
> +If the target machine is aarch32 we can use the following command,
> +provided the cross file has been modified accordingly::
> 
>     meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc
>     ninja -C aarch32-build
> --
> 2.20.1
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH v2 3/4] doc: arm64 cross build numactl compilers
  2021-12-07 11:05   ` [PATCH v2 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
@ 2021-12-15  8:38     ` Ruifeng Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Ruifeng Wang @ 2021-12-15  8:38 UTC (permalink / raw)
  To: Juraj Linkeš,
	thomas, david.marchand, Honnappa Nagarahalli, ferruh.yigit,
	jerinjacobk
  Cc: dev, nd

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Tuesday, December 7, 2021 7:05 PM
> To: thomas@monjalon.net; david.marchand@redhat.com; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; ferruh.yigit@intel.com; jerinjacobk@gmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v2 3/4] doc: arm64 cross build numactl compilers
> 
> Numactl cross compilation doesn't work with clang, remove it and fix the gcc
> cross compiler executable name.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 7 ++++---
>  1 file changed, 4 insertions(+), 3 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 af159bbf93..6153bc5b77 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -35,13 +35,14 @@ NUMA is required by most modern machines, not
> needed for non-NUMA architectures.
>     git checkout v2.0.13 -b v2.0.13
>     ./autogen.sh
>     autoconf -i
> -   ./configure --host=aarch64-linux-gnu CC=<compiler> --prefix=<numa
> install dir>
> +   ./configure --host=aarch64-linux-gnu CC=aarch64-none-linux-gnu-gcc
> + --prefix=<numa install dir>
>     make install
> 
>  .. note::
> 
> -   The compiler above can be either aarch64-linux-gnu-gcc or clang.
> -   See below for information on how to get specific compilers.
> +   The compiler is aarch64-none-linux-gnu-gcc if you download gcc using the
> +   below guide. If you're using a different compiler, make sure you're using
> +   the proper executable name.
> 
>  The numa header files and lib file is generated in the include and lib folder
> respectively under ``<numa install dir>``.
> --
> 2.20.1
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH v2 4/4] docs: add an example arm64 cross file
  2021-12-07 11:05   ` [PATCH v2 4/4] docs: add an example arm64 cross file Juraj Linkeš
@ 2021-12-15  8:59     ` Ruifeng Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Ruifeng Wang @ 2021-12-15  8:59 UTC (permalink / raw)
  To: Juraj Linkeš,
	thomas, david.marchand, Honnappa Nagarahalli, ferruh.yigit,
	jerinjacobk
  Cc: dev, nd

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Tuesday, December 7, 2021 7:05 PM
> To: thomas@monjalon.net; david.marchand@redhat.com; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; ferruh.yigit@intel.com; jerinjacobk@gmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v2 4/4] docs: add an example arm64 cross file
> 
> The docs mention modifications and additions to the cross file, but there is
> no demonstration of how those should look like.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> 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 6153bc5b77..78bf19882e 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -137,6 +137,32 @@ Cross Compiling DPDK with GNU toolchain using
> Meson
>     ones, which have an extra "-none-" in their name. Please modify the cross
>     file binaries accordingly when using the downloaded cross compilers.
> 
> +   An example cross file with modified names and added numa paths would
> look
> +   like this:
> +
> +.. code-block:: console
> +
> +   [binaries]
> +   c = 'aarch64-none-linux-gnu-gcc'
> +   cpp = 'aarch64-none-linux-gnu-cpp'
> +   ar = 'aarch64-none-linux-gnu-gcc-ar'
> +   strip = 'aarch64-none-linux-gnu-strip'
> +   pkgconfig = 'aarch64-linux-gnu-pkg-config' # the downloaded binaries
> +      # don't contain a pkgconfig binary, so it's not modified
> +   pcap-config = ''
> +
> +   [host_machine]
> +   system = 'linux'
> +   cpu_family = 'aarch64'
> +   cpu = 'armv8-a'
> +   endian = 'little'
> +
> +   [properties]
> +   # Generate binaries that are portable across all Armv8 machines
> +   platform = 'generic'
> +   c_args = ['-I<numa_install_dir>/include']  # replace <numa_install_dir>
> +   c_link_args = ['-L<numa_install_dir>/lib'] # with your path
> +
>  To cross-compile DPDK on a desired target machine we can use the following
>  command::
> 
> --
> 2.20.1
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 0/4] arm64 cross docs improvements/fixes
  2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
                     ` (3 preceding siblings ...)
  2021-12-07 11:05   ` [PATCH v2 4/4] docs: add an example arm64 cross file Juraj Linkeš
@ 2022-01-25 13:19   ` Juraj Linkeš
  2022-01-25 13:19     ` [PATCH v3 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
                       ` (4 more replies)
  4 siblings, 5 replies; 18+ messages in thread
From: Juraj Linkeš @ 2022-01-25 13:19 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The docs are a bit outdated and in need of updates.

Using CFLAGS and LDFLAGS is an artefact of the old build system, Meson
doesn't support those well.

Numaclt can't be cross compiled with clang.

The names of downloaded binaried have an extra -none- in them.

And to make these changes more easily understandable, add an example
cross file.

v3: rebase and minor reformat in:
  doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  docs: add an example arm64 cross file

Juraj Linkeš (4):
  doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  doc: arm64 cross build binary names update
  doc: arm64 cross build numactl compilers
  doc: add an example arm64 cross file

 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 69 ++++++++++++++++---
 1 file changed, 60 insertions(+), 9 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
@ 2022-01-25 13:19     ` Juraj Linkeš
  2022-01-25 13:20     ` [PATCH v3 2/4] doc: arm64 cross build binary names update Juraj Linkeš
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Juraj Linkeš @ 2022-01-25 13:19 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

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š <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../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..d6131055c5 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 <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/9.2.1/
    cp <numa_install_dir>/lib/libnuma.so <cross_install_dir>/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<numa_install_dir>/include -Dc_link_args=-L<numa_install_dir>/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<numa_install_dir>/include']
+   c_link_args = ['-L<numa_install_dir>/lib']
+
 Cross Compiling DPDK with GNU toolchain using Meson
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 2/4] doc: arm64 cross build binary names update
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
  2022-01-25 13:19     ` [PATCH v3 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
@ 2022-01-25 13:20     ` Juraj Linkeš
  2022-01-25 13:20     ` [PATCH v3 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
                       ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Juraj Linkeš @ 2022-01-25 13:20 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The newer versions have an extra -none- in the name.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 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 d6131055c5..d53407c679 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -130,6 +130,12 @@ may be added to cross files under [properties]:
 Cross Compiling DPDK with GNU toolchain using Meson
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+.. note::
+
+   The names of gcc binaries in cross files differ from the downloaded
+   ones, which have an extra "-none-" in their name. Please modify the cross
+   file binaries accordingly when using the downloaded cross compilers.
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
@@ -137,12 +143,13 @@ command::
    ninja -C cross-build
 
 For example if the target machine is aarch64 we can use the following
-command::
+command, provided the cross file has been modified accordingly::
 
    meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
    ninja -C aarch64-build-gcc
 
-If the target machine is aarch32 we can use the following command::
+If the target machine is aarch32 we can use the following command, provided
+the cross file has been modified accordingly::
 
    meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc
    ninja -C aarch32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 3/4] doc: arm64 cross build numactl compilers
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
  2022-01-25 13:19     ` [PATCH v3 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
  2022-01-25 13:20     ` [PATCH v3 2/4] doc: arm64 cross build binary names update Juraj Linkeš
@ 2022-01-25 13:20     ` Juraj Linkeš
  2022-01-25 13:20     ` [PATCH v3 4/4] doc: add an example arm64 cross file Juraj Linkeš
  2022-03-16 19:19     ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Thomas Monjalon
  4 siblings, 0 replies; 18+ messages in thread
From: Juraj Linkeš @ 2022-01-25 13:20 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

Numactl cross compilation doesn't work with clang, remove it and fix the
gcc cross compiler executable name.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 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 d53407c679..045cc05c65 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -35,13 +35,14 @@ NUMA is required by most modern machines, not needed for non-NUMA architectures.
    git checkout v2.0.13 -b v2.0.13
    ./autogen.sh
    autoconf -i
-   ./configure --host=aarch64-linux-gnu CC=<compiler> --prefix=<numa install dir>
+   ./configure --host=aarch64-linux-gnu CC=aarch64-none-linux-gnu-gcc --prefix=<numa install dir>
    make install
 
 .. note::
 
-   The compiler above can be either aarch64-linux-gnu-gcc or clang.
-   See below for information on how to get specific compilers.
+   The compiler is aarch64-none-linux-gnu-gcc if you download gcc using the
+   below guide. If you're using a different compiler, make sure you're using
+   the proper executable name.
 
 The numa header files and lib file is generated in the include and lib folder
 respectively under ``<numa install dir>``.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 4/4] doc: add an example arm64 cross file
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
                       ` (2 preceding siblings ...)
  2022-01-25 13:20     ` [PATCH v3 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
@ 2022-01-25 13:20     ` Juraj Linkeš
  2022-03-16 19:19     ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Thomas Monjalon
  4 siblings, 0 replies; 18+ messages in thread
From: Juraj Linkeš @ 2022-01-25 13:20 UTC (permalink / raw)
  To: thomas, david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang,
	ferruh.yigit, jerinjacobk
  Cc: dev, Juraj Linkeš

The docs mention modifications and additions to the cross file, but
there is no demonstration of how those should look like.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

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 045cc05c65..f491725948 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -137,6 +137,32 @@ Cross Compiling DPDK with GNU toolchain using Meson
    ones, which have an extra "-none-" in their name. Please modify the cross
    file binaries accordingly when using the downloaded cross compilers.
 
+   An example cross file with modified names and added numa paths would look
+   like this:
+
+   .. code-block:: console
+
+      [binaries]
+      c = 'aarch64-none-linux-gnu-gcc'
+      cpp = 'aarch64-none-linux-gnu-cpp'
+      ar = 'aarch64-none-linux-gnu-gcc-ar'
+      strip = 'aarch64-none-linux-gnu-strip'
+      pkgconfig = 'aarch64-linux-gnu-pkg-config' # the downloaded binaries
+         # don't contain a pkgconfig binary, so it's not modified
+      pcap-config = ''
+
+      [host_machine]
+      system = 'linux'
+      cpu_family = 'aarch64'
+      cpu = 'armv8-a'
+      endian = 'little'
+
+      [properties]
+      # Generate binaries that are portable across all Armv8 machines
+      platform = 'generic'
+      c_args = ['-I<numa_install_dir>/include']  # replace <numa_install_dir>
+      c_link_args = ['-L<numa_install_dir>/lib'] # with your path
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 0/4] arm64 cross docs improvements/fixes
  2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
                       ` (3 preceding siblings ...)
  2022-01-25 13:20     ` [PATCH v3 4/4] doc: add an example arm64 cross file Juraj Linkeš
@ 2022-03-16 19:19     ` Thomas Monjalon
  4 siblings, 0 replies; 18+ messages in thread
From: Thomas Monjalon @ 2022-03-16 19:19 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: david.marchand, Honnappa.Nagarahalli, Ruifeng.Wang, ferruh.yigit,
	jerinjacobk, dev

25/01/2022 14:19, Juraj Linkeš:
> The docs are a bit outdated and in need of updates.
> 
> Using CFLAGS and LDFLAGS is an artefact of the old build system, Meson
> doesn't support those well.
> 
> Numaclt can't be cross compiled with clang.
> 
> The names of downloaded binaried have an extra -none- in them.
> 
> And to make these changes more easily understandable, add an example
> cross file.
> 
> v3: rebase and minor reformat in:
>   doc: arm64 cross build CFLAGS/LDFLAGS alternatives
>   docs: add an example arm64 cross file
> 
> Juraj Linkeš (4):
>   doc: arm64 cross build CFLAGS/LDFLAGS alternatives
>   doc: arm64 cross build binary names update
>   doc: arm64 cross build numactl compilers
>   doc: add an example arm64 cross file

Improved details (like line wrapping and uppercases),
and applied, thanks.




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-03-16 19:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 10:00 [PATCH v1] doc: arm64 cross docs improvements/fixes Juraj Linkeš
2021-11-26 13:53 ` Thomas Monjalon
2021-11-26 14:17   ` Juraj Linkeš
2021-12-07 11:05 ` [PATCH v2 0/4] " Juraj Linkeš
2021-12-07 11:05   ` [PATCH v2 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
2021-12-15  8:00     ` Ruifeng Wang
2021-12-07 11:05   ` [PATCH v2 2/4] doc: arm64 cross build binary names update Juraj Linkeš
2021-12-15  8:02     ` Ruifeng Wang
2021-12-07 11:05   ` [PATCH v2 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
2021-12-15  8:38     ` Ruifeng Wang
2021-12-07 11:05   ` [PATCH v2 4/4] docs: add an example arm64 cross file Juraj Linkeš
2021-12-15  8:59     ` Ruifeng Wang
2022-01-25 13:19   ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Juraj Linkeš
2022-01-25 13:19     ` [PATCH v3 1/4] doc: arm64 cross build CFLAGS/LDFLAGS alternatives Juraj Linkeš
2022-01-25 13:20     ` [PATCH v3 2/4] doc: arm64 cross build binary names update Juraj Linkeš
2022-01-25 13:20     ` [PATCH v3 3/4] doc: arm64 cross build numactl compilers Juraj Linkeš
2022-01-25 13:20     ` [PATCH v3 4/4] doc: add an example arm64 cross file Juraj Linkeš
2022-03-16 19:19     ` [PATCH v3 0/4] arm64 cross docs improvements/fixes Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).