aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-04-05 15:29:37 -0700
committerRosen Penev <rosenp@gmail.com>2021-04-05 15:31:59 -0700
commit42baf1bac5932d54d9a19f5ce28001c0d745731a (patch)
treedb651952fa529fa4f7b1e67c687e1e40dcf3d505
parentafdcfb525c488e4d153fd06535bc2a434a6ea3d4 (diff)
meson: fix compilation with at least spice
This commit should also get rid of pointless option warnings. Also removed an extra ) that was causing a bad cpu value. Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--devel/meson/meson.mk2
-rw-r--r--devel/meson/patches/010-options.patch31
2 files changed, 32 insertions, 1 deletions
diff --git a/devel/meson/meson.mk b/devel/meson/meson.mk
index ac74bd5bf..400f2f193 100644
--- a/devel/meson/meson.mk
+++ b/devel/meson/meson.mk
@@ -88,7 +88,7 @@ define Meson/CreateCrossFile
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
-e "s|@ARCH@|$(MESON_ARCH)|" \
- -e "s|@CPU@|$(MESON_CPU))|" \
+ -e "s|@CPU@|$(MESON_CPU)|" \
-e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \
< $(MESON_DIR)/openwrt-cross.txt.in \
> $(1)
diff --git a/devel/meson/patches/010-options.patch b/devel/meson/patches/010-options.patch
new file mode 100644
index 000000000..c96dabbcd
--- /dev/null
+++ b/devel/meson/patches/010-options.patch
@@ -0,0 +1,31 @@
+From 5277eb2232387312c64c79e5622a61cefc26dec0 Mon Sep 17 00:00:00 2001
+From: Dylan Baker <dylan@pnwbakers.com>
+Date: Mon, 5 Apr 2021 13:05:45 -0700
+Subject: [PATCH] coredata: Check for built-in options as host options
+
+These options often don't exist for the build machine, as they're
+generally invalid (ie, prefix, libdir, etc). So we should always check
+for their existance as host optiuons, since all we want to know in this
+case is if the option is yeilding (valid per-subproject), and build/vs
+host doesn't matter in that cases:
+
+Fixes #8613
+---
+ mesonbuild/coredata.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/mesonbuild/coredata.py
++++ b/mesonbuild/coredata.py
+@@ -754,7 +754,11 @@ class CoreData:
+ if k.subproject and k.subproject != subproject:
+ continue
+ # If the option is a builtin and is yielding then it's not allowed per subproject.
+- if subproject and k.is_builtin() and self.options[k.as_root()].yielding:
++ #
++ # Always test this using the HOST machine, as many builtin options
++ # are not valid for the BUILD machine, but the yielding value does
++ # not differ between them even when they are valid for both.
++ if subproject and k.is_builtin() and self.options[k.evolve(subproject='', machine=MachineChoice.HOST)].yielding:
+ continue
+ # Skip base, compiler, and backend options, they are handled when
+ # adding languages and setting backend.