From bf41247f52ffd40d91d94d1fc983f8a831b80e48 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Sep 2018 16:18:43 +0100 Subject: meson: respect target/native flag distinction in G-I and gtk-doc Remove the previous attempt at this from 0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch as it wasn't quite right, and the rest of the patch is adding the currently not upstreamable runner option. Add two new patches to fix both gobject-introspection and gtk-doc using native flags for target compiles. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/meson/meson/gi-flags.patch | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 meta/recipes-devtools/meson/meson/gi-flags.patch (limited to 'meta/recipes-devtools/meson/meson/gi-flags.patch') diff --git a/meta/recipes-devtools/meson/meson/gi-flags.patch b/meta/recipes-devtools/meson/meson/gi-flags.patch new file mode 100644 index 0000000000..9a4c296191 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/gi-flags.patch @@ -0,0 +1,35 @@ +Pass the correct cflags/ldflags to the gobject-introspection tools. + +Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/4261] +Signed-off-by: Ross Burton + +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py +index cb69641e..bb4449a0 100644 +--- a/mesonbuild/modules/gnome.py ++++ b/mesonbuild/modules/gnome.py +@@ -579,7 +579,10 @@ class GnomeModule(ExtensionModule): + external_ldflags += list(dep_external_ldflags) + scan_command += ['--cflags-begin'] + scan_command += cflags +- scan_command += state.environment.coredata.get_external_args(lang) ++ if state.environment.is_cross_build(): ++ scan_command += state.environment.cross_info.config["properties"].get(lang + '_args', "") ++ else: ++ scan_command += state.environment.coredata.get_external_args(lang) + scan_command += ['--cflags-end'] + # need to put our output directory first as we need to use the + # generated libraries instead of any possibly installed system/prefix +@@ -614,7 +614,12 @@ class GnomeModule(ExtensionModule): + scan_command.append('-L' + d) + scan_command += ['--library', libname] + +- for link_arg in state.environment.coredata.get_external_link_args(lang): ++ if state.environment.is_cross_build(): ++ link_args = state.environment.cross_info.config["properties"].get(lang + '_link_args', "") ++ else: ++ link_args = state.environment.coredata.get_external_link_args(lang) ++ ++ for link_arg in link_args: + if link_arg.startswith('-L'): + scan_command.append(link_arg) + scan_command += list(external_ldflags) -- cgit 1.2.3-korg