Re: [Mesa-dev] [PATCH mesa 1/2] docs: add meson cross compilation instructions

2018-11-29 Thread Dylan Baker
Quoting Eric Engestrom (2018-11-29 07:50:58)
> Signed-off-by: Eric Engestrom 
> ---
> The 32-bit linux one is tested, but the other two are "I think this
> should be right".
> ---
>  docs/meson.html | 83 +
>  1 file changed, 83 insertions(+)
> 
> diff --git a/docs/meson.html b/docs/meson.html
> index 68f80d6ac42d6f48d359..baa1f0f327e99d86e9a5 100644
> --- a/docs/meson.html
> +++ b/docs/meson.html
> @@ -16,6 +16,11 @@ The Mesa 3D Graphics Library
>  
>  Compilation and Installation using Meson
>  
> +
> +  Basic Usage
> +  Cross-compilation and 32-bit 
> builds
> +
> +
>  1. Basic Usage
>  
>  The Meson build system is generally considered stable and ready
> @@ -190,6 +195,84 @@ 1. Basic Usage
>  
>  
>  
> +2. Cross-compilation and 32-bit builds
> +
> +https://mesonbuild.com/Cross-compilation.html;>Meson supports
> +cross-compilation by specifying a number of binary paths and
> +settings in a file and passing this file to meson or
> +meson configure with the --cross-file
> +parameter.
> +
> +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
> +
> +Below are a few example of cross files, but keep in mind that you
> +will likely have to alter them for your system.
> +
> +
> +32-bit build on x86 linux:
> +
> +[binaries]
> +c = '/usr/bin/gcc'
> +cpp = '/usr/bin/g++'
> +ar = '/usr/bin/ar'

It's better if possible to use gcc-ar instead of ar, you can't LTO without
gcc-ar, for example.

Without or without the above,
Reviewed-by: Dylan Baker 

> +strip = '/usr/bin/strip'
> +pkgconfig = '/usr/bin/pkg-config-32'
> +llvm-config = '/usr/bin/llvm-config'
> +
> +[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'
> +
> +
> +
> +
> +64-bit build on ARM linux:
> +
> +[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'
> +
> +
> +
> +
> +64-bit build on x86 windows:
> +
> +[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'
> +
> +
> +
>  
>  
>  
> -- 
> Cheers,
>   Eric
> 


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH mesa 1/2] docs: add meson cross compilation instructions

2018-11-29 Thread Emil Velikov
On Thu, 29 Nov 2018 at 15:51, Eric Engestrom  wrote:
>
> Signed-off-by: Eric Engestrom 
> ---
> The 32-bit linux one is tested, but the other two are "I think this
> should be right".

There's a small nit about the 32 bit linux build. But regardless, the series is
Reviewed-by: Emil Velikov 

If any of the examples off, we can correct when we spot it. These are
a really good starting point.


> +ar = '/usr/bin/ar'
AFAICT the archive produced by ar shouldn't vary across CPU
architectures. Although varying filename limitations (imposed by the
file system) are common.

> +llvm-config = '/usr/bin/llvm-config'
llvm-config will vary greatly across distros, but on Arch it should be
llvm-config32,
Things may work with as-is, but I'm not sure how reliable/good idea it is.

HTH
-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH mesa 1/2] docs: add meson cross compilation instructions

2018-11-29 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
The 32-bit linux one is tested, but the other two are "I think this
should be right".
---
 docs/meson.html | 83 +
 1 file changed, 83 insertions(+)

diff --git a/docs/meson.html b/docs/meson.html
index 68f80d6ac42d6f48d359..baa1f0f327e99d86e9a5 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -16,6 +16,11 @@ The Mesa 3D Graphics Library
 
 Compilation and Installation using Meson
 
+
+  Basic Usage
+  Cross-compilation and 32-bit builds
+
+
 1. Basic Usage
 
 The Meson build system is generally considered stable and ready
@@ -190,6 +195,84 @@ 1. Basic Usage
 
 
 
+2. Cross-compilation and 32-bit builds
+
+https://mesonbuild.com/Cross-compilation.html;>Meson supports
+cross-compilation by specifying a number of binary paths and
+settings in a file and passing this file to meson or
+meson configure with the --cross-file
+parameter.
+
+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
+
+Below are a few example of cross files, but keep in mind that you
+will likely have to alter them for your system.
+
+
+32-bit build on x86 linux:
+
+[binaries]
+c = '/usr/bin/gcc'
+cpp = '/usr/bin/g++'
+ar = '/usr/bin/ar'
+strip = '/usr/bin/strip'
+pkgconfig = '/usr/bin/pkg-config-32'
+llvm-config = '/usr/bin/llvm-config'
+
+[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'
+
+
+
+
+64-bit build on ARM linux:
+
+[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'
+
+
+
+
+64-bit build on x86 windows:
+
+[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'
+
+
+
 
 
 
-- 
Cheers,
  Eric

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev