summaryrefslogtreecommitdiffstats
path: root/docs/meson.html
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-11-29 13:16:42 +0000
committerEric Engestrom <[email protected]>2018-12-19 16:31:51 +0000
commitb0319d07683c8d76a93e233b918ea61b38438a3c (patch)
tree86b69bce72aa1391ea4f22f10895915ffc859232 /docs/meson.html
parentb45aa6290bfcecf6a33dd5eb20f333907fb09251 (diff)
docs: add meson cross compilation instructions
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'docs/meson.html')
-rw-r--r--docs/meson.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/docs/meson.html b/docs/meson.html
index 68f80d6ac42..21e15ad1c1d 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -16,6 +16,11 @@
<h1>Compilation and Installation using Meson</h1>
+<ul>
+ <li><a href="#basic">Basic Usage</a></li>
+ <li><a href="#cross-compilation">Cross-compilation and 32-bit builds</a></li>
+</ul>
+
<h2 id="basic">1. Basic Usage</h2>
<p><strong>The Meson build system is generally considered stable and ready
@@ -190,6 +195,84 @@ is unrelated to the <code>buildtype</code>; setting the latter to
</dd>
</dl>
+<h2 id="cross-compilation">2. Cross-compilation and 32-bit builds</h2>
+
+<p><a href="https://mesonbuild.com/Cross-compilation.html">Meson supports
+cross-compilation</a> by specifying a number of binary paths and
+settings in a file and passing this file to <code>meson</code> or
+<code>meson configure</code> with the <code>--cross-file</code>
+parameter.</p>
+
+<p>This file can live at any location, but you can use the bare filename
+(without the folder path) if you put it in $XDG_DATA_HOME/meson/cross or
+~/.local/share/meson/cross</p>
+
+<p>Below are a few example of cross files, but keep in mind that you
+will likely have to alter them for your system.</p>
+
+<p>
+32-bit build on x86 linux:
+<pre>
+[binaries]
+c = '/usr/bin/gcc'
+cpp = '/usr/bin/g++'
+ar = '/usr/bin/gcc-ar'
+strip = '/usr/bin/strip'
+pkgconfig = '/usr/bin/pkg-config-32'
+llvm-config = '/usr/bin/llvm-config32'
+
+[properties]
+c_args = ['-m32']
+c_link_args = ['-m32']
+cpp_args = ['-m32']
+cpp_link_args = ['-m32']
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
+</pre>
+</p>
+
+<p>
+64-bit build on ARM linux:
+<pre>
+[binaries]
+c = '/usr/bin/aarch64-linux-gnu-gcc'
+cpp = '/usr/bin/aarch64-linux-gnu-g++'
+ar = '/usr/bin/aarch64-linux-gnu-ar'
+strip = '/usr/bin/aarch64-linux-gnu-strip'
+pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'
+exe_wrapper = '/usr/bin/qemu-aarch64-static'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'aarch64'
+endian = 'little'
+</pre>
+</p>
+
+<p>
+64-bit build on x86 windows:
+<pre>
+[binaries]
+c = '/usr/bin/x86_64-w64-mingw32-gcc'
+cpp = '/usr/bin/x86_64-w64-mingw32-g++'
+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'
+exe_wrapper = 'wine'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86_64'
+cpu = 'i686'
+endian = 'little'
+</pre>
+</p>
+
</div>
</body>
</html>