diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 10:05:37 -0700 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-22 21:26:31 -0400 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/meson/meson | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/meson/meson')
4 files changed, 299 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch b/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch new file mode 100644 index 000000000..97778c32e --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch @@ -0,0 +1,30 @@ +From 4676224dbdff0f7107e8cbdbe0eab19c855f1454 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 17 Nov 2017 13:18:28 +0200 +Subject: [PATCH] Linker rules: move {cross_args} in front of {output_args} + +The previous order was found to break linking in some cases +(e.g. when -no-pic -fno-PIC was present in {cross_args}. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + mesonbuild/backend/ninjabackend.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py +index bb281e1..969b70e 100644 +--- a/mesonbuild/backend/ninjabackend.py ++++ b/mesonbuild/backend/ninjabackend.py +@@ -1501,7 +1501,7 @@ int dummy; + rspfile_content = $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing + ''' + else: +- command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n' ++ command_template = ' command = {executable} $ARGS {cross_args} {output_args} $in $LINK_ARGS $aliasing\n' + command = command_template.format( + executable=' '.join(compiler.get_linker_exelist()), + cross_args=' '.join(cross_args), +-- +2.15.0 + diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch new file mode 100644 index 000000000..1912e9435 --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch @@ -0,0 +1,113 @@ +From c5692cac9c555664281377a82bf8b1e46934f437 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 4 Aug 2017 16:16:41 +0300 +Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling + +Specifically: +1) Make it possible to specify a wrapper for executing binaries +(usually, some kind of target hardware emulator, such as qemu) +2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will +try to guess them, incorrectly. +3) If things break down, print the full command with arguments, +not just the binary name. +4) Correctly determine the compiler/linker executables and cross-options when cross-compiling + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + +--- + mesonbuild/modules/gnome.py | 18 +++++++++++++++--- + mesonbuild/scripts/gtkdochelper.py | 9 +++++++-- + 2 files changed, 22 insertions(+), 5 deletions(-) + +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py +index 56765a5..4f7fe30 100644 +--- a/mesonbuild/modules/gnome.py ++++ b/mesonbuild/modules/gnome.py +@@ -769,6 +769,10 @@ This will become a hard error in the future.''') + '--mode=' + mode] + if namespace: + args.append('--namespace=' + namespace) ++ gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None) ++ if gtkdoc_exe_wrapper is not None: ++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper) ++ + args += self._unpack_args('--htmlargs=', 'html_args', kwargs) + args += self._unpack_args('--scanargs=', 'scan_args', kwargs) + args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs) +@@ -796,14 +800,22 @@ This will become a hard error in the future.''') + raise MesonException( + 'Gir include dirs should be include_directories().') + cflags.update(get_include_args(inc_dirs)) ++ ++ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', "")) ++ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', "")) ++ + if cflags: +- args += ['--cflags=%s' % ' '.join(cflags)] ++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))] + if ldflags: +- args += ['--ldflags=%s' % ' '.join(ldflags)] ++ args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))] + compiler = state.environment.coredata.compilers.get('c') +- if compiler: ++ cross_compiler = state.environment.coredata.cross_compilers.get('c') ++ if compiler and not state.environment.is_cross_build(): + args += ['--cc=%s' % ' '.join(compiler.get_exelist())] + args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())] ++ elif cross_compiler and state.environment.is_cross_build(): ++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())] ++ args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())] + + return args + +diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py +index 4406b28..b846827 100644 +--- a/mesonbuild/scripts/gtkdochelper.py ++++ b/mesonbuild/scripts/gtkdochelper.py +@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='') + parser.add_argument('--namespace', dest='namespace', default='') + parser.add_argument('--mode', dest='mode', default='') + parser.add_argument('--installdir', dest='install_dir') ++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper') + + def gtkdoc_run_check(cmd, cwd): + # Put stderr into stdout since we want to print it out anyway. + # This preserves the order of messages. + p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2] + if p.returncode != 0: +- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)] ++ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)] + if out: + err_msg.append(out) + raise MesonException('\n'.join(err_msg)) +@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd): + def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs, + main_file, module, + html_args, scan_args, fixxref_args, mkdb_args, +- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags, ++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags, + html_assets, content_files, ignore_headers, namespace, + expand_content_files, mode): + print("Building documentation for %s" % module) +@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs, + if gobject_typesfile: + scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile, + '--module=' + module, ++ '--run=' + gtkdoc_exe_wrapper, ++ '--cc=' + cc, ++ '--ld=' + ld, + '--cflags=' + cflags, + '--ldflags=' + ldflags, + '--ld=' + ld] +@@ -207,6 +211,7 @@ def run(args): + mkdbargs, + options.gobject_typesfile, + scanobjsargs, ++ options.gtkdoc_exe_wrapper, + options.ld, + options.cc, + options.ldflags, +-- +2.15.0 + diff --git a/poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch new file mode 100644 index 000000000..ded42d14f --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch @@ -0,0 +1,42 @@ +From 972667e0d789a6969a5d79249404f3539f891810 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 4 Aug 2017 16:18:47 +0300 +Subject: [PATCH 1/2] gobject-introspection: determine g-ir-scanner and + g-ir-compiler paths from pkgconfig + +Do not hardcode the name of those binaries; gobject-introspection +provides them via pkgconfig, and they can be set to something else +(for example when cross-compiling). + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + +--- + mesonbuild/modules/gnome.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py +index 4f7fe30..9610cf6 100644 +--- a/mesonbuild/modules/gnome.py ++++ b/mesonbuild/modules/gnome.py +@@ -390,8 +390,6 @@ class GnomeModule(ExtensionModule): + raise MesonException('Gir takes one argument') + if kwargs.get('install_dir'): + raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"') +- giscanner = find_program('g-ir-scanner', 'Gir') +- gicompiler = find_program('g-ir-compiler', 'Gir') + girtarget = args[0] + while hasattr(girtarget, 'held_object'): + girtarget = girtarget.held_object +@@ -402,6 +400,8 @@ class GnomeModule(ExtensionModule): + self.gir_dep = PkgConfigDependency('gobject-introspection-1.0', + state.environment, + {'native': True}) ++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}) ++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}) + pkgargs = self.gir_dep.get_compile_args() + except Exception: + raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.') +-- +2.15.0 + diff --git a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch new file mode 100644 index 000000000..af5e6a190 --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch @@ -0,0 +1,114 @@ +From ffa72eac56558aa4171dd70ac1e9c27a07338fa2 Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> +Date: Wed, 15 Nov 2017 15:05:01 +0100 +Subject: [PATCH 4/4] native_bindir + +Some libraries, like QT, have pre-processors that convert their input +files into something that the cross-compiler can process. We find the +path of those pre-processors via pkg-config-native instead of +pkg-config. + +This path forces the use of pkg-config-native for host_bins arguments. + +There are some discussions upstream to merge this patch, but I presonaly believe +that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323 + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> + +--- + mesonbuild/dependencies/base.py | 16 ++++++++++------ + mesonbuild/dependencies/ui.py | 6 +++--- + 2 files changed, 13 insertions(+), 9 deletions(-) + +diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py +index bf79bc5..c9fd08c 100644 +--- a/mesonbuild/dependencies/base.py ++++ b/mesonbuild/dependencies/base.py +@@ -131,7 +131,7 @@ class Dependency: + def need_threads(self): + return False + +- def get_pkgconfig_variable(self, variable_name, kwargs): ++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False): + raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) + + def get_configtool_variable(self, variable_name): +@@ -150,7 +150,7 @@ class InternalDependency(Dependency): + self.sources = sources + self.ext_deps = ext_deps + +- def get_pkgconfig_variable(self, variable_name, kwargs): ++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False): + raise DependencyException('Method "get_pkgconfig_variable()" is ' + 'invalid for an internal dependency') + +@@ -425,10 +425,14 @@ class PkgConfigDependency(ExternalDependency): + return s.format(self.__class__.__name__, self.name, self.is_found, + self.version_reqs) + +- def _call_pkgbin(self, args, env=None): ++ def _call_pkgbin(self, args, env=None, use_native=False): + if not env: + env = os.environ +- p, out = Popen_safe([self.pkgbin] + args, env=env)[0:2] ++ if use_native: ++ pkgbin = [self.pkgbin + "-native"] ++ else: ++ pkgbin = [self.pkgbin] ++ p, out = Popen_safe(pkgbin + args, env=env)[0:2] + return p.returncode, out.strip() + + def _convert_mingw_paths(self, args): +@@ -522,7 +526,7 @@ class PkgConfigDependency(ExternalDependency): + # linkers such as MSVC, so prepend them. + self.link_args = ['-L' + lp for lp in libpaths] + self.link_args + +- def get_pkgconfig_variable(self, variable_name, kwargs): ++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False): + options = ['--variable=' + variable_name, self.name] + + if 'define_variable' in kwargs: +@@ -535,7 +539,7 @@ class PkgConfigDependency(ExternalDependency): + + options = ['--define-variable=' + '='.join(definition)] + options + +- ret, out = self._call_pkgbin(options) ++ ret, out = self._call_pkgbin(options, use_native=use_native) + variable = '' + if ret != 0: + if self.required: +diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py +index 1db518c..4ed1d04 100644 +--- a/mesonbuild/dependencies/ui.py ++++ b/mesonbuild/dependencies/ui.py +@@ -239,7 +239,7 @@ class QtBaseDependency(ExternalDependency): + self.bindir = self.get_pkgconfig_host_bins(core) + if not self.bindir: + # If exec_prefix is not defined, the pkg-config file is broken +- prefix = core.get_pkgconfig_variable('exec_prefix', {}) ++ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True) + if prefix: + self.bindir = os.path.join(prefix, 'bin') + +@@ -359,7 +359,7 @@ class Qt4Dependency(QtBaseDependency): + applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] + for application in applications: + try: +- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {})) ++ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True)) + except MesonException: + pass + +@@ -369,7 +369,7 @@ class Qt5Dependency(QtBaseDependency): + QtBaseDependency.__init__(self, 'qt5', env, kwargs) + + def get_pkgconfig_host_bins(self, core): +- return core.get_pkgconfig_variable('host_bins', {}) ++ return core.get_pkgconfig_variable('host_bins', {}, use_native=True) + + + # There are three different ways of depending on SDL2: +-- +2.15.1 + |