meson: Patch around overly strict struct size check.

Fixes systemd cross-compile.
This commit is contained in:
Shea Levy 2018-03-24 07:50:16 -04:00
parent 9bfd74deff
commit b2a2131ff0
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
2 changed files with 16 additions and 0 deletions

View File

@ -43,6 +43,10 @@ in python3Packages.buildPythonApplication rec {
src = ./fix-rpath.patch;
inherit (builtins) storeDir;
})
# No one will ever need more than 128 bytes of data structure
# https://github.com/mesonbuild/meson/issues/3113
./overly-strict-size-check.patch
];
setupHook = ./setup-hook.sh;

View File

@ -0,0 +1,12 @@
diff -Naur a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
--- a/mesonbuild/compilers/c.py 2017-12-10 08:37:19.000000000 -0500
+++ b/mesonbuild/compilers/c.py 2018-03-24 07:46:04.739929307 -0400
@@ -406,7 +406,7 @@
}}'''
if not self.compiles(t.format(**fargs), env, extra_args, dependencies):
return -1
- return self.cross_compute_int('sizeof(%s)' % typename, 1, 128, None, prefix, env, extra_args, dependencies)
+ return self.cross_compute_int('sizeof(%s)' % typename, 1, 1024, None, prefix, env, extra_args, dependencies)
def sizeof(self, typename, prefix, env, extra_args=None, dependencies=None):
if extra_args is None: