summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-07-09 19:27:43 -0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-07-25 10:58:19 +0000
commit6c92613a38fbbe9eea53dd1d64e2d94387f5d43e (patch)
treef793a71a0d21321f66dd3579f8c668a5f13d7d89
parente208b999d416f200a33287149b91872af457fa51 (diff)
meson: Backport fix for Glib including a GCC-only flag in the pkg-config file
See https://github.com/mesonbuild/meson/pull/13398 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1528>
-rw-r--r--recipes/build-tools/meson.recipe4
-rw-r--r--recipes/build-tools/meson/0001-nasm-Add-mms-bitfields-to-the-list-of-ignored-flags.patch29
2 files changed, 33 insertions, 0 deletions
diff --git a/recipes/build-tools/meson.recipe b/recipes/build-tools/meson.recipe
index 038f8721..bc50b622 100644
--- a/recipes/build-tools/meson.recipe
+++ b/recipes/build-tools/meson.recipe
@@ -23,6 +23,10 @@ class Recipe(recipe.Recipe):
files_bin = ['bin/meson']
files_python = []
+ patches = [
+ f'{name}/0001-nasm-Add-mms-bitfields-to-the-list-of-ignored-flags.patch'
+ ]
+
async def install(self):
# setup.py barfs if using posix paths on Windows
if self.config.platform == Platform.WINDOWS:
diff --git a/recipes/build-tools/meson/0001-nasm-Add-mms-bitfields-to-the-list-of-ignored-flags.patch b/recipes/build-tools/meson/0001-nasm-Add-mms-bitfields-to-the-list-of-ignored-flags.patch
new file mode 100644
index 00000000..a91b534f
--- /dev/null
+++ b/recipes/build-tools/meson/0001-nasm-Add-mms-bitfields-to-the-list-of-ignored-flags.patch
@@ -0,0 +1,29 @@
+From 677feadf9f6d6d544be27c807d92538297044920 Mon Sep 17 00:00:00 2001
+From: "L. E. Segovia" <amy@amyspark.me>
+Date: Tue, 9 Jul 2024 19:02:09 -0300
+Subject: [PATCH] nasm: Add -mms-bitfields to the list of ignored flags
+
+Fixes building Nasm objects with Meson's native language support, when
+depending against a library that exports that flag, like Glib.
+
+(cherry picked from commit 8b73edd80a3c8ccb8fb6e1f8c8b48fd21175187b)
+---
+ mesonbuild/compilers/asm.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py
+index d04fbd293..c5e552165 100644
+--- a/mesonbuild/compilers/asm.py
++++ b/mesonbuild/compilers/asm.py
+@@ -73,7 +73,7 @@ class NasmCompiler(Compiler):
+ def unix_args_to_native(self, args: T.List[str]) -> T.List[str]:
+ outargs: T.List[str] = []
+ for arg in args:
+- if arg == '-pthread':
++ if arg in {'-mms-bitfields', '-pthread'}:
+ continue
+ outargs.append(arg)
+ return outargs
+--
+2.44.0.windows.1
+