meson: support multiple cross configuration files
PATCH 1/1 meson: support multiple cross configuration files
For historical reasons Meson supports only a single cross configuration file but multiple native configuration files. Add support for multiple cross files, so that recipes such as glib can use the toolchain cross file and extend it with a recipe-specific cross file containing values needed to build.
Signed-off-by Ross Burton <[email protected]>
--- meta/recipes-devtools/meson/meson.inc | 3 +- .../meson/meson/cross-libdir.patch | 18 +- meta/recipes-devtools/meson/meson/many-cross.patch | 207 +++++++++++++++++++++ 3 files changed, 215 insertions(+), 13 deletions(-) create mode 100644 meta/recipes-devtools/meson/meson/many-cross.patch
meta/recipes-devtools/meson/meson.inc +2 -1
@@ -11,10 +11,11 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://0003-native_bindir.patch \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ file://disable-rpath-handling.patch \ - file://cross-libdir.patch \ file://0001-modules-windows-split-WINDRES-env-variable.patch \ file://0002-environment.py-detect-windows-also-if-the-system-str.patch \ file://cross-prop-default.patch \ + file://many-cross.patch \ + file://cross-libdir.patch \ " SRC_URI[sha256sum] = "ef9f14326ec1e30d3ba1a26df0f92826ede5a79255ad723af78a2691c37109fd" SRC_URI[md5sum] = "0267b0871266056184c484792572c682"
meta/recipes-devtools/meson/meson/cross-libdir.patch +6 -12
@@ -7,17 +7,11 @@ Date: Thu, 27 Dec 2018 23:43:35 +0200 Subject: [PATCH] Default libdir is "lib" when cross compiling. Closes #2535. --- - docs/markdown/snippets/crosslib.md | 7 +++++++ - mesonbuild/coredata.py | 8 ++++++++ - run_unittests.py | 13 +++++++++++++ - 3 files changed, 28 insertions(+) - create mode 100644 docs/markdown/snippets/crosslib.md - diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py -index d70c23038c..4e2f3e008c 100644 +index ff810683..9ee23a69 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py -@@ -299,6 +299,7 @@ def __init__(self, options): +@@ -298,6 +298,7 @@ class CoreData: # Only to print a warning if it changes between Meson invocations. self.pkgconf_envvar = os.environ.get('PKG_CONFIG_PATH', '') self.config_files = self.__load_config_files(options.native_file)
@@ -25,15 +19,15 @@ index d70c23038c..4e2f3e008c 100644 @staticmethod def __load_config_files(filenames): -@@ -348,6 +349,13 @@ def __load_cross_file(filename): - - raise MesonException('Cannot find specified cross file: ' + filename) +@@ -309,6 +310,13 @@ class CoreData: + for f in filenames] + return filenames + def libdir_cross_fixup(self): + # By default set libdir to "lib" when cross compiling since + # getting the "system default" is always wrong on multiarch + # platforms as it gets a value like lib/x86_64-linux-gnu. -+ if self.cross_file is not None: ++ if self.cross_files: + self.builtins['libdir'].value = 'lib' + def sanitize_prefix(self, prefix):
meta/recipes-devtools/meson/meson/many-cross.patch new file +207 -0
207 lines not on this page · raw message
Signature · 1 line
2.11.0