From c5966303178fe5f1de050d914499f349d52534b1 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 20 Mar 2020 13:04:31 -0700 Subject: poky: meson: cherry-pick 0.52.0 -> 0.53.2 Alexander Kanavin (3): meson: update 0.52.0 -> 0.52.1 meson: update 0.52.1 -> 0.53.0 meson: upgrade 0.53.0 -> 0.53.1 William A. Kennington III (1): meson: upgrade 0.53.1 -> 0.53.2 Change-Id: I5617b9f3f710968e57e0c3330dc57abe3f23d1e2 Signed-off-by: William A. Kennington III --- poky/meta/recipes-devtools/meson/meson.inc | 5 +- .../0001-Make-CPU-family-warnings-fatal.patch | 12 +-- ...le-do-not-manipulate-the-environment-when.patch | 16 ++-- ...02-Support-building-allarch-recipes-again.patch | 6 +- .../meson/meson/0003-native_bindir.patch | 38 ++++----- .../dbc9e971bd320f3df15c1ee74f54858e6792b183.patch | 95 ---------------------- poky/meta/recipes-devtools/meson/meson_0.52.0.bb | 3 - poky/meta/recipes-devtools/meson/meson_0.53.2.bb | 4 + .../meson/nativesdk-meson_0.52.0.bb | 66 --------------- .../meson/nativesdk-meson_0.53.2.bb | 65 +++++++++++++++ 10 files changed, 107 insertions(+), 203 deletions(-) delete mode 100644 poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch delete mode 100644 poky/meta/recipes-devtools/meson/meson_0.52.0.bb create mode 100644 poky/meta/recipes-devtools/meson/meson_0.53.2.bb delete mode 100644 poky/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb create mode 100644 poky/meta/recipes-devtools/meson/nativesdk-meson_0.53.2.bb (limited to 'poky') diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc index 84bcc8409..50fb41ac9 100644 --- a/poky/meta/recipes-devtools/meson/meson.inc +++ b/poky/meta/recipes-devtools/meson/meson.inc @@ -16,10 +16,9 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://cross-prop-default.patch \ file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ - file://dbc9e971bd320f3df15c1ee74f54858e6792b183.patch \ " -SRC_URI[sha256sum] = "d60f75f0dedcc4fd249dbc7519d6f3ce6df490033d276ef1cf27453ef4938d32" -SRC_URI[md5sum] = "7ea7772414dda8ae11072244bf7ba991" +SRC_URI[sha256sum] = "3e8f830f33184397c2eb0b651ec502adb63decb28978bdc84b3558d71284c21f" +SRC_URI[md5sum] = "80303535995fcae72bdb887df102b421" SRC_URI_append_class-native = " \ file://0001-Make-CPU-family-warnings-fatal.patch \ diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index fc55dcacf..9ce31e548 100644 --- a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch @@ -1,4 +1,4 @@ -From c07d29b715209cd5d75b142a00a540d45b00c36d Mon Sep 17 00:00:00 2001 +From ee638fd4a299bfc53a2238e9f71ae310c8d97460 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 3 Jul 2018 13:59:09 +0100 Subject: [PATCH] Make CPU family warnings fatal @@ -12,10 +12,10 @@ Signed-off-by: Ross Burton 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index a59cd89..17de654 100644 +index 0f277a7..24578ea 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py -@@ -186,7 +186,7 @@ class MachineInfo: +@@ -192,7 +192,7 @@ class MachineInfo: cpu_family = literal['cpu_family'] if cpu_family not in known_cpu_families: @@ -25,15 +25,15 @@ index a59cd89..17de654 100644 endian = literal['endian'] if endian not in ('little', 'big'): diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index 3704921..f1988f2 100644 +index dc8b14f..3aab71e 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py -@@ -251,9 +251,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: +@@ -354,9 +354,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: trial = 'parisc' if trial not in known_cpu_families: - mlog.warning('Unknown CPU family {!r}, please report this at ' -- 'https://github.com/mesonbuild/meson/issues/new with the' +- 'https://github.com/mesonbuild/meson/issues/new with the ' - 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial)) + raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch index bf715d1e9..eb0e90dbd 100644 --- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch +++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch @@ -1,4 +1,4 @@ -From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001 +From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 19 Nov 2018 14:24:26 +0100 Subject: [PATCH] python module: do not manipulate the environment when calling @@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 12 deletions(-) diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py -index 9cfbd6f..3ff687a 100644 +index 07be318..b770603 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py -@@ -75,11 +75,6 @@ class PythonDependency(ExternalDependency): +@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency): old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') old_pkg_path = os.environ.get('PKG_CONFIG_PATH') @@ -25,10 +25,10 @@ index 9cfbd6f..3ff687a 100644 - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir - try: - self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs) - mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir)) -@@ -88,13 +83,6 @@ class PythonDependency(ExternalDependency): - mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir)) + self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) + mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir)) +@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency): + mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir)) mlog.debug(e) - if old_pkg_path is not None: @@ -39,5 +39,5 @@ index 9cfbd6f..3ff687a 100644 - else: - os.environ.pop('PKG_CONFIG_LIBDIR', None) else: - mlog.debug('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir)) + mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir)) diff --git a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index b8837d77b..ce1866075 100644 --- a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch @@ -1,4 +1,4 @@ -From 263fc0e26e1fd92e25fa3ef93f4a549dcebc5887 Mon Sep 17 00:00:00 2001 +From 9c221c74bd306dfa6fec22c8f156eb9d4e4f7fcb Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Thu, 26 Jul 2018 16:32:49 +0200 Subject: [PATCH] Support building allarch recipes again @@ -13,7 +13,7 @@ Signed-off-by: Peter Kjellerstedt 1 file changed, 1 insertion(+) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index 17de654..2d2deef 100644 +index 24578ea..216e71f 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -36,6 +36,7 @@ _T = typing.TypeVar('_T') @@ -22,5 +22,5 @@ index 17de654..2d2deef 100644 known_cpu_families = ( + 'allarch', 'aarch64', + 'alpha', 'arc', - 'arm', diff --git a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch index 76cc4931d..dc822fb1f 100644 --- a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch +++ b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch @@ -1,4 +1,4 @@ -From 4a1d676522d6b56cbe9a45c3b040afaa27d37f78 Mon Sep 17 00:00:00 2001 +From e76726321067748362b39937bd1e663a1a948ad5 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Wed, 15 Nov 2017 15:05:01 +0100 Subject: [PATCH] native_bindir @@ -22,10 +22,10 @@ Signed-off-by: Ricardo Ribalda Delgado 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py -index 3c55a56..eb52fd1 100644 +index 40e304c..4b687df 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py -@@ -185,7 +185,7 @@ class Dependency: +@@ -184,7 +184,7 @@ class Dependency: def get_exe_args(self, compiler): return [] @@ -34,7 +34,7 @@ index 3c55a56..eb52fd1 100644 raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) def get_configtool_variable(self, variable_name): -@@ -248,7 +248,7 @@ class InternalDependency(Dependency): +@@ -247,7 +247,7 @@ class InternalDependency(Dependency): self.sources = sources self.ext_deps = ext_deps @@ -43,7 +43,7 @@ index 3c55a56..eb52fd1 100644 raise DependencyException('Method "get_pkgconfig_variable()" is ' 'invalid for an internal dependency') -@@ -670,15 +670,18 @@ class PkgConfigDependency(ExternalDependency): +@@ -673,15 +673,18 @@ class PkgConfigDependency(ExternalDependency): return s.format(self.__class__.__name__, self.name, self.is_found, self.version_reqs) @@ -54,18 +54,18 @@ index 3c55a56..eb52fd1 100644 + cmd = [self.pkgbin.get_command()[0] + "-native"] + args + else: + cmd = self.pkgbin.get_command() + args - p, out = Popen_safe(cmd, env=env)[0:2] - rc, out = p.returncode, out.strip() + p, out, err = Popen_safe(cmd, env=env) + rc, out, err = p.returncode, out.strip(), err.strip() call = ' '.join(cmd) mlog.debug("Called `{}` -> {}\n{}".format(call, rc, out)) - return rc, out + return rc, out, err - def _call_pkgbin(self, args, env=None): + def _call_pkgbin(self, args, env=None, use_native=False): # Always copy the environment since we're going to modify it # with pkg-config variables if env is None: -@@ -698,7 +701,7 @@ class PkgConfigDependency(ExternalDependency): +@@ -701,7 +704,7 @@ class PkgConfigDependency(ExternalDependency): targs = tuple(args) cache = PkgConfigDependency.pkgbin_cache if (self.pkgbin, targs, fenv) not in cache: @@ -73,27 +73,27 @@ index 3c55a56..eb52fd1 100644 + cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native) return cache[(self.pkgbin, targs, fenv)] - def _convert_mingw_paths(self, args): -@@ -926,7 +929,7 @@ class PkgConfigDependency(ExternalDependency): - mlog.warning('Could not determine complete list of dependencies for %s' % self.name) - self.link_args, self.raw_link_args = self._search_libs(out, out_raw, out_all) + def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]: +@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency): + (self.name, out_raw)) + self.link_args, self.raw_link_args = self._search_libs(out, out_raw) - 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: -@@ -939,7 +942,7 @@ class PkgConfigDependency(ExternalDependency): +@@ -920,7 +923,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) +- ret, out, err = self._call_pkgbin(options) ++ ret, out, err = 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 6d784e6..73a9e13 100644 +index da411ef..856506a 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -330,7 +330,7 @@ class QtBaseDependency(ExternalDependency): @@ -105,7 +105,7 @@ index 6d784e6..73a9e13 100644 if prefix: self.bindir = os.path.join(prefix, 'bin') -@@ -507,7 +507,7 @@ class Qt4Dependency(QtBaseDependency): +@@ -508,7 +508,7 @@ class Qt4Dependency(QtBaseDependency): applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] for application in applications: try: @@ -114,7 +114,7 @@ index 6d784e6..73a9e13 100644 except MesonException: pass -@@ -517,7 +517,7 @@ class Qt5Dependency(QtBaseDependency): +@@ -518,7 +518,7 @@ class Qt5Dependency(QtBaseDependency): QtBaseDependency.__init__(self, 'qt5', env, kwargs) def get_pkgconfig_host_bins(self, core): diff --git a/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch b/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch deleted file mode 100644 index 7ea8a133e..000000000 --- a/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch +++ /dev/null @@ -1,95 +0,0 @@ -From dbc9e971bd320f3df15c1ee74f54858e6792b183 Mon Sep 17 00:00:00 2001 -From: Xavier Claessens -Date: Fri, 11 Oct 2019 11:01:22 -0400 -Subject: [PATCH] Remove duplicated object files in static libraries - -When a static library link_whole to a bunch of other static libraries, -we have to extract all their objects recursively. But that could -introduce duplicated objects. ar is dumb enough to allow this without -error, but once the resulting static library is linked into an -executable or shared library, the linker will complain about duplicated -symbols. - -Upstream-Status: Backport -Signed-off-by: Richard Purdie - ---- - mesonbuild/backend/backends.py | 3 ++- - test cases/unit/69 static link/lib/func17.c | 4 ++++ - test cases/unit/69 static link/lib/func18.c | 6 ++++++ - test cases/unit/69 static link/lib/func19.c | 7 +++++++ - test cases/unit/69 static link/lib/meson.build | 12 ++++++++++++ - 5 files changed, 31 insertions(+), 1 deletion(-) - create mode 100644 test cases/unit/69 static link/lib/func17.c - create mode 100644 test cases/unit/69 static link/lib/func18.c - create mode 100644 test cases/unit/69 static link/lib/func19.c - -diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py -index 947be1cbef..e54809657f 100644 ---- a/mesonbuild/backend/backends.py -+++ b/mesonbuild/backend/backends.py -@@ -281,7 +281,8 @@ def relpath(self, todir, fromdir): - os.path.join('dummyprefixdir', fromdir)) - - def flatten_object_list(self, target, proj_dir_to_build_root=''): -- return self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root) -+ obj_list = self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root) -+ return list(dict.fromkeys(obj_list)) - - def _flatten_object_list(self, target, objects, proj_dir_to_build_root): - obj_list = [] -diff --git a/test cases/unit/69 static link/lib/func17.c b/test cases/unit/69 static link/lib/func17.c -new file mode 100644 -index 0000000000..d1d8ec498c ---- /dev/null -+++ b/test cases/unit/69 static link/lib/func17.c -@@ -0,0 +1,4 @@ -+int func17() -+{ -+ return 1; -+} -diff --git a/test cases/unit/69 static link/lib/func18.c b/test cases/unit/69 static link/lib/func18.c -new file mode 100644 -index 0000000000..c149085ba4 ---- /dev/null -+++ b/test cases/unit/69 static link/lib/func18.c -@@ -0,0 +1,6 @@ -+int func17(); -+ -+int func18() -+{ -+ return func17() + 1; -+} -diff --git a/test cases/unit/69 static link/lib/func19.c b/test cases/unit/69 static link/lib/func19.c -new file mode 100644 -index 0000000000..69120e4bf8 ---- /dev/null -+++ b/test cases/unit/69 static link/lib/func19.c -@@ -0,0 +1,7 @@ -+int func17(); -+int func18(); -+ -+int func19() -+{ -+ return func17() + func18(); -+} -diff --git a/test cases/unit/69 static link/lib/meson.build b/test cases/unit/69 static link/lib/meson.build -index 5f04aab6a1..8f95fc4546 100644 ---- a/test cases/unit/69 static link/lib/meson.build -+++ b/test cases/unit/69 static link/lib/meson.build -@@ -66,3 +66,15 @@ libfunc15 = static_library('func15', 'func15.c', - libfunc16 = static_library('func16', 'func16.c', - link_with : libfunc15, - install : true) -+ -+# Verify func17.c.o gets included only once into libfunc19, otherwise -+# func19-shared would failed with duplicated symbol. -+libfunc17 = static_library('func17', 'func17.c', -+ install : false) -+libfunc18 = static_library('func18', 'func18.c', -+ link_with : libfunc17, -+ install : false) -+libfunc19 = static_library('func19', 'func19.c', -+ link_whole : [libfunc17, libfunc18], -+ install : false) -+shared_library('func19-shared', link_whole : [libfunc19]) diff --git a/poky/meta/recipes-devtools/meson/meson_0.52.0.bb b/poky/meta/recipes-devtools/meson/meson_0.52.0.bb deleted file mode 100644 index 897fa148d..000000000 --- a/poky/meta/recipes-devtools/meson/meson_0.52.0.bb +++ /dev/null @@ -1,3 +0,0 @@ -include meson.inc - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/meson/meson_0.53.2.bb b/poky/meta/recipes-devtools/meson/meson_0.53.2.bb new file mode 100644 index 000000000..de9b905c1 --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson_0.53.2.bb @@ -0,0 +1,4 @@ +include meson.inc + +BBCLASSEXTEND = "native" + diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb deleted file mode 100644 index 1756f342c..000000000 --- a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.52.0.bb +++ /dev/null @@ -1,66 +0,0 @@ -include meson.inc - -inherit nativesdk -inherit siteinfo - -SRC_URI += "file://meson-setup.py \ - file://meson-wrapper" - -def meson_endian(prefix, d): - arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS") - sitedata = siteinfo_data_for_machine(arch, os, d) - if "endian-little" in sitedata: - return "little" - elif "endian-big" in sitedata: - return "big" - else: - bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) - -# The cross file logic is similar but not identical to that in meson.bbclass, -# since it's generating for an SDK rather than a cross-compile. Important -# differences are: -# - We can't set vars like CC, CXX, etc. yet because they will be filled in with -# real paths by meson-setup.sh when the SDK is extracted. -# - Some overrides aren't needed, since the SDK injects paths that take care of -# them. -do_install_append() { - install -d ${D}${datadir}/meson - cat >${D}${datadir}/meson/meson.cross.template <${D}${datadir}/meson/meson.cross.template <