From: Dmitry Kozlyuk Date: Thu, 27 Feb 2020 04:25:35 +0000 (+0300) Subject: build: add cross-file for MinGW-w64 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=1d714553061a93f656086d14cd8e36f7ee3fc711 build: add cross-file for MinGW-w64 Add Meson configuration to cross-compile for Windows using MinGW-w64. It may require adjustments in some cases, but at least it provides the foundation. Signed-off-by: Dmitry Kozlyuk Tested-by: William Tu Tested-by: Pallavi Kadam --- diff --git a/config/x86/meson_mingw.txt b/config/x86/meson_mingw.txt new file mode 100644 index 0000000000..fac33cfcd6 --- /dev/null +++ b/config/x86/meson_mingw.txt @@ -0,0 +1,13 @@ +[binaries] +c = '/usr/bin/x86_64-w64-mingw32-gcc' +cpp = '/usr/bin/x86_64-w64-mingw32-g++' +ld = '/usr/bin/x86_64-w64-mingw32-ld' +ar = '/usr/bin/x86_64-w64-mingw32-ar' +strip = '/usr/bin/x86_64-w64-mingw32-strip' +pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config' + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'native' +endian = 'little' diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst index a0e51dfcb3..d46e84e3fb 100644 --- a/doc/guides/windows_gsg/build_dpdk.rst +++ b/doc/guides/windows_gsg/build_dpdk.rst @@ -101,6 +101,17 @@ To compile the examples, the flag ``-Dexamples`` is required. meson -Dexamples=helloworld build ninja -C build +Option 2. Cross-Compile with MinGW-w64 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The cross-file option must be specified for Meson. +Depending on the distribution, paths in this file may need adjustments. + +.. code-block:: console + + meson --cross-file config/x86/meson_mingw.txt -Dexamples=helloworld build + ninja -C build + Run the helloworld example ==========================