1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 02:00:04 +00:00

meson: add a backported patch to address vala cross-compilation errors

(From OE-Core rev: c8ac42f5110c9b8e4f2c275332651df152013c0a)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2019-08-02 17:57:47 +02:00
committed by Richard Purdie
parent 6acb599395
commit 8118295209
2 changed files with 51 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \
file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \
file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
file://vala-cross-compile.patch \
"
SRC_URI[sha256sum] = "f27b7a60f339ba66fe4b8f81f0d1072e090a08eabbd6aa287683b2c2b9dd2d82"
SRC_URI[md5sum] = "48787e391ec5c052799a3dd491f73909"
@@ -0,0 +1,50 @@
From 77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d Mon Sep 17 00:00:00 2001
From: James Westman <flyingpimonster@flyingpimonster.net>
Date: Mon, 24 Jun 2019 12:04:12 -0500
Subject: [PATCH] Fix two errors when cross-compiling with Vala
- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs'
Fixed by adding a `get_program_dirs()` function to the base Compiler
class, to match `get_library_dirs()`
- KeyError: 'vala_COMPILER'
Fixed by creating the Vala compile rules for all machines, not just
the build machine.
Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
mesonbuild/backend/ninjabackend.py | 3 +--
mesonbuild/compilers/compilers.py | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index a454e6ab5f..b830e377e4 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1653,8 +1653,7 @@ def generate_compile_rule_for(self, langname, compiler):
self.generate_cs_compile_rule(compiler)
return
if langname == 'vala':
- if self.environment.machines.matches_build_machine(compiler.for_machine):
- self.generate_vala_compile_rules(compiler)
+ self.generate_vala_compile_rules(compiler)
return
if langname == 'rust':
self.generate_rust_compile_rules(compiler)
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 5855de71c8..86c1e33407 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1117,6 +1117,9 @@ def find_library(self, *args, **kwargs):
def get_library_dirs(self, *args, **kwargs):
return ()
+ def get_program_dirs(self, *args, **kwargs):
+ return ()
+
def has_multi_arguments(self, args, env) -> Tuple[bool, bool]:
raise EnvironmentException(
'Language {} does not support has_multi_arguments.'.format(