| Newsgroups |
gmane.linux.lfs.book |
| Message-ID |
<[email protected]> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch multilib
in repository lfs.
commit 595424970ccdae94a28b3757d471b893bdcc73fd
Author: Zeckmathederg <[email protected]>
AuthorDate: Tue Feb 24 14:16:48 2026 -0700
Meson-ML: Add cross and native files.
---
chapter08/meson.xml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/chapter08/meson.xml b/chapter08/meson.xml
index bc5ec2555..cc5a8efdc 100644
--- a/chapter08/meson.xml
+++ b/chapter08/meson.xml
@@ -72,6 +72,87 @@ install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/
</varlistentry>
</variablelist>
+
+ <para arch="ml_32,ml_x32,ml_all">
+ When targetting the <phrase arch="ml_32,ml_all">32-bit</phrase>
+ <phrase arch="ml_all">or</phrase>
+ <phrase arch="ml_x32,ml_all">x32-bit</phrase>
+ architecture<phrase arch="ml_all">s</phrase> on 64-bit, some packages
+ using Meson-based build systems will sometimes use wrong
+ architecture-specific settings, bit sizes, and pull in libraries not
+ meant for the architecture being targeted. This doesn't happen often but
+ requires complex solutions to solve without cross or native files. Errors
+ can range from linking and out-of-bounds, to other various cryptic
+ output.
+ </para>
+
+ <para arch="ml_32,ml_x32,ml_all">
+ Cross and native files specify architecture specific information
+ which either honestly and slyly tells Meson what the target or host is so
+ it uses correct information and libraries. Create those files now:
+ </para>
+
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="install"
+ arch="ml_32,ml_x32,ml_all">mkdir -pv /usr/share/meson/cross
+mkdir -pv /usr/share/meson/native
+</userinput><userinput remap="install"
+ arch="ml_32,ml_all">
+for i in {cross/lib32,native/x86}; do
+cat > /usr/share/meson/$i << "EOF"
+<literal>[binaries]
+c = ['gcc', '-m32']
+cpp = ['g++', '-m32']
+rust = ['rustc', '--target', 'i686-unknown-linux-gnu']
+pkg-config = 'i686-pc-linux-gnu-pkg-config'
+ar = '/usr/bin/ar'
+strip = '/usr/bin/strip'
+cups-config = 'cups-config'
+llvm-config = 'llvm-config'
+exe_wrapper = ''
+
+[properties]
+sizeof_void* = 4
+sizeof_long = 4
+
+[host_machine]
+system = 'linux'
+subsystem = 'linux'
+kernel = 'linux'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'</literal>
+EOF
+done</userinput><userinput remap="install"
+ arch="ml_all">
+</userinput><userinput remap="install"
+ arch="ml_x32,ml_all">
+for i in {cross/libx32,native/x32}; do
+cat > /usr/share/meson/$i << "EOF"
+<literal>[binaries]
+c = ['gcc', '-mx32']
+cpp = ['g++', '-mx32']
+rust = ['rustc', '--target', 'x86_64-unknown-linux-gnux32']
+pkg-config = 'x86_64-pc-linux-gnux32-pkg-config'
+ar = '/usr/bin/ar'
+strip = '/usr/bin/strip'
+cups-config = 'cups-config'
+llvm-config = 'llvm-config'
+exe_wrapper = ''
+
+[properties]
+sizeof_void* = 4
+sizeof_long = 4
+
+[host_machine]
+system = 'linux'
+subsystem = 'linux'
+kernel = 'linux'
+cpu_family = 'x86'
+cpu = 'x86_64'
+endian = 'little'</literal>
+EOF
+done</userinput></screen>
+
</sect2>
<sect2 id="contents-meson" role="content">
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page