-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcross-linux-x86.ini
More file actions
71 lines (65 loc) · 2.21 KB
/
cross-linux-x86.ini
File metadata and controls
71 lines (65 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# --------------------------------------------------------------------------
# Cross build definition file for compiling a 32-bit x86 linux executable
#
# Set up a build directory:
#
# meson setup --cross-file cross-linux-x86.ini build-dir-for-linux-x86
#
# NOTE: You may name the build directory whatever you want. A popular
# convention is to use 'build' or begin with 'build'. Recommended. Keeps all
# the build directories grouped together in file listing, and makes it easy to
# blow away all the builds with `rm -r build*/` or, safer, with interactive
# prompt: `rm -rI build*/` or `find . -maxdepth 1 -name 'build*' -type d
# -print0 | xargs -0rp -n 1 rm -r`.
#
# Compile:
#
# meson compile -v -C build-dir-for-linux-x86
#
# Run:
#
# build-dir-for-linux-x86/shapes_bouncing_ball
#
# You'll probably need to install some 32 bit libraries. For example, on a
# Fedora machine, we had to install these:
#
# sudo dnf install glibc-devel.i686
# sudo dnf install gdk-pixbuf2-xlib.i686
# sudo dnf install glx-utils.i686
# sudo dnf install mesa-dri-drivers.i686
#
# --------------------------------------------------------------------------
[binaries]
#c = '/usr/bin/gcc'
c = ['/usr/bin/gcc', '-m32']
strip = '/usr/bin/strip'
[properties]
# Alternative way to set the -m32 flag
#c_args = ['-m32']
# Wasn't needed
#c_link_args = ['-m32']
[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i386'
endian = 'little'
# Wasn't sure what value to use for the 'cpu' field
#
# Documentation says:
#
# The second value is cpu which is a more specific subtype for the CPU.
# Typical values for a x86 CPU family might include i386 or i586 and for arm
# family armv5 or armv7hl.
#
# https://mesonbuild.com/Cross-compilation.html
#
# The example shown in the documentation shows 'i686'.
#
# This field doesn't seem to be validated against anything. It took a value of
# 'blah' without any complaint. The verbose output of the compiler shows no
# trace of it, so I wonder if it is even used. Perhaps it is used for
# optimized builds. Nope. I did a --buildtype=debugoptimized build for i686
# and the generated gcc commands make no reference to i686. Shrug.
#
# The raylib project targets i386 for its 32 bit release. I'll follow that
# lead.