From 617395787efa008d60ae656e2bc2f003199171de Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 24 Jan 2020 15:09:01 +0100 Subject: host-meson: version bump 0.51.2 -> 0.53.1 Signed-off-by: Michael Olbrich --- ...ths-for-shared-libaries-in-get_link_dep_s.patch | 26 ------------- ...paths-for-build-directories-when-cross-co.patch | 38 ------------------- ...K-don-t-loose-the-rpath-for-host-packages.patch | 44 ---------------------- .../0004-HACK-enable-NEON-only-for-ARMv7.patch | 25 ------------ patches/meson-0.51.2/series | 7 ---- ...ths-for-shared-libaries-in-get_link_dep_s.patch | 26 +++++++++++++ ...paths-for-build-directories-when-cross-co.patch | 38 +++++++++++++++++++ ...K-don-t-loose-the-rpath-for-host-packages.patch | 44 ++++++++++++++++++++++ .../0004-HACK-enable-NEON-only-for-ARMv7.patch | 25 ++++++++++++ patches/meson-0.53.1/series | 7 ++++ 10 files changed, 140 insertions(+), 140 deletions(-) delete mode 100644 patches/meson-0.51.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch delete mode 100644 patches/meson-0.51.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch delete mode 100644 patches/meson-0.51.2/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch delete mode 100644 patches/meson-0.51.2/0004-HACK-enable-NEON-only-for-ARMv7.patch delete mode 100644 patches/meson-0.51.2/series create mode 100644 patches/meson-0.53.1/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch create mode 100644 patches/meson-0.53.1/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch create mode 100644 patches/meson-0.53.1/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch create mode 100644 patches/meson-0.53.1/0004-HACK-enable-NEON-only-for-ARMv7.patch create mode 100644 patches/meson-0.53.1/series (limited to 'patches') diff --git a/patches/meson-0.51.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch b/patches/meson-0.51.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch deleted file mode 100644 index 5e2b793b3..000000000 --- a/patches/meson-0.51.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Michael Olbrich -Date: Mon, 18 Mar 2019 10:41:08 +0100 -Subject: [PATCH] only use paths for shared libaries in get_link_dep_subdirs() - -This is used for -rpath / -rpath-link. So paths for anything else make no -sense. - -Signed-off-by: Michael Olbrich ---- - mesonbuild/build.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/mesonbuild/build.py b/mesonbuild/build.py -index 55b162974bcc..1c09219c87b7 100644 ---- a/mesonbuild/build.py -+++ b/mesonbuild/build.py -@@ -763,7 +763,8 @@ class BuildTarget(Target): - def get_link_dep_subdirs(self): - result = OrderedSet() - for i in self.link_targets: -- result.add(i.get_subdir()) -+ if isinstance(i, SharedLibrary): -+ result.add(i.get_subdir()) - result.update(i.get_link_dep_subdirs()) - return result - diff --git a/patches/meson-0.51.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch b/patches/meson-0.51.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch deleted file mode 100644 index f2f531a66..000000000 --- a/patches/meson-0.51.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Michael Olbrich -Date: Mon, 18 Mar 2019 10:42:15 +0100 -Subject: [PATCH] don't add rpaths for build directories when cross-compiling - -The binaries cannot be executed anyways, so this just increases the binary -size unnecessarily. - -Signed-off-by: Michael Olbrich ---- - mesonbuild/compilers/compilers.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py -index b188788b915a..aafabd4f7a1b 100644 ---- a/mesonbuild/compilers/compilers.py -+++ b/mesonbuild/compilers/compilers.py -@@ -1277,7 +1277,10 @@ class Compiler: - # Need to deduplicate rpaths, as macOS's install_name_tool - # is *very* allergic to duplicate -delete_rpath arguments - # when calling depfixer on installation. -- all_paths = OrderedSet([os.path.join(origin_placeholder, p) for p in processed_rpaths]) -+ if not self.is_cross: -+ all_paths = OrderedSet([os.path.join(origin_placeholder, p) for p in processed_rpaths]) -+ else: -+ all_paths = OrderedSet() - # Build_rpath is used as-is (it is usually absolute). - if build_rpath != '': - all_paths.add(build_rpath) -@@ -1304,7 +1307,8 @@ class Compiler: - paths = padding - else: - paths = paths + ':' + padding -- args.append('-Wl,-rpath,' + paths) -+ if paths: -+ args.append('-Wl,-rpath,' + paths) - - if mesonlib.is_sunos(): - return args diff --git a/patches/meson-0.51.2/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch b/patches/meson-0.51.2/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch deleted file mode 100644 index 4b714b2b6..000000000 --- a/patches/meson-0.51.2/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Michael Olbrich -Date: Mon, 18 Mar 2019 13:04:32 +0100 -Subject: [PATCH] HACK: don't loose the rpath for host packages - -Needed by ptxdist to run tools in sysroot-host - -Signed-off-by: Michael Olbrich ---- - mesonbuild/backend/backends.py | 6 +++++- - mesonbuild/minstall.py | 2 +- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py -index 085589074d52..30b180c07457 100644 ---- a/mesonbuild/backend/backends.py -+++ b/mesonbuild/backend/backends.py -@@ -1077,9 +1077,13 @@ class Backend: - # Done separately because of strip/aliases/rpath - if outdirs[0] is not False: - mappings = t.get_link_deps_mapping(d.prefix, self.environment) -+ if not t.install_rpath and not self.environment.is_cross_build(): -+ install_rpath = None -+ else: -+ install_rpath = t.install_rpath - i = TargetInstallData(self.get_target_filename(t), outdirs[0], - t.get_aliases(), should_strip, mappings, -- t.install_rpath, install_mode) -+ install_rpath, install_mode) - d.targets.append(i) - # On toolchains/platforms that use an import library for - # linking (separate from the shared library with all the -diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py -index ed82c3791a72..e3d5c96eb215 100644 ---- a/mesonbuild/minstall.py -+++ b/mesonbuild/minstall.py -@@ -486,7 +486,7 @@ class Installer: - print("Symlink creation does not work on this platform. " - "Skipping all symlinking.") - printed_symlink_error = True -- if os.path.isfile(outname): -+ if os.path.isfile(outname) and install_rpath is not None: - try: - depfixer.fix_rpath(outname, install_rpath, final_path, - install_name_mappings, verbose=False) diff --git a/patches/meson-0.51.2/0004-HACK-enable-NEON-only-for-ARMv7.patch b/patches/meson-0.51.2/0004-HACK-enable-NEON-only-for-ARMv7.patch deleted file mode 100644 index a479b4083..000000000 --- a/patches/meson-0.51.2/0004-HACK-enable-NEON-only-for-ARMv7.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Michael Olbrich -Date: Tue, 1 Oct 2019 22:30:59 +0200 -Subject: [PATCH] HACK: enable NEON only for ARMv7 - -NEON detection is broken, so just skip it for anything that is not ARMv7. - -Signed-off-by: Michael Olbrich ---- - mesonbuild/modules/unstable_simd.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/mesonbuild/modules/unstable_simd.py b/mesonbuild/modules/unstable_simd.py -index 2f2f67f79091..a329a4761d20 100644 ---- a/mesonbuild/modules/unstable_simd.py -+++ b/mesonbuild/modules/unstable_simd.py -@@ -62,6 +62,9 @@ class SimdModule(ExtensionModule): - continue - iset_fname = kwargs[iset] # Migth also be an array or Files. static_library will validate. - args = compiler.get_instruction_set_args(iset) -+ cpu = state.environment.machines.host.cpu -+ if iset == 'neon' and not cpu.startswith('armv7'): -+ args = None - if args is None: - mlog.log('Compiler supports %s:' % iset, mlog.red('NO')) - continue diff --git a/patches/meson-0.51.2/series b/patches/meson-0.51.2/series deleted file mode 100644 index e6ca14c3f..000000000 --- a/patches/meson-0.51.2/series +++ /dev/null @@ -1,7 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch -0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch -0003-HACK-don-t-loose-the-rpath-for-host-packages.patch -0004-HACK-enable-NEON-only-for-ARMv7.patch -# 3d7acfa5e27658c133f3d4f6976b1453 - git-ptx-patches magic diff --git a/patches/meson-0.53.1/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch b/patches/meson-0.53.1/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch new file mode 100644 index 000000000..943bf545d --- /dev/null +++ b/patches/meson-0.53.1/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch @@ -0,0 +1,26 @@ +From: Michael Olbrich +Date: Mon, 18 Mar 2019 10:41:08 +0100 +Subject: [PATCH] only use paths for shared libaries in get_link_dep_subdirs() + +This is used for -rpath / -rpath-link. So paths for anything else make no +sense. + +Signed-off-by: Michael Olbrich +--- + mesonbuild/build.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/build.py b/mesonbuild/build.py +index 0eb930bea0fb..8e50d67ee133 100644 +--- a/mesonbuild/build.py ++++ b/mesonbuild/build.py +@@ -792,7 +792,8 @@ class BuildTarget(Target): + def get_link_dep_subdirs(self): + result = OrderedSet() + for i in self.link_targets: +- result.add(i.get_subdir()) ++ if isinstance(i, SharedLibrary): ++ result.add(i.get_subdir()) + result.update(i.get_link_dep_subdirs()) + return result + diff --git a/patches/meson-0.53.1/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch b/patches/meson-0.53.1/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch new file mode 100644 index 000000000..a040a230e --- /dev/null +++ b/patches/meson-0.53.1/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch @@ -0,0 +1,38 @@ +From: Michael Olbrich +Date: Mon, 18 Mar 2019 10:42:15 +0100 +Subject: [PATCH] don't add rpaths for build directories when cross-compiling + +The binaries cannot be executed anyways, so this just increases the binary +size unnecessarily. + +Signed-off-by: Michael Olbrich +--- + mesonbuild/linkers.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py +index 0a5c57e08a02..e905d2cc2617 100644 +--- a/mesonbuild/linkers.py ++++ b/mesonbuild/linkers.py +@@ -516,7 +516,10 @@ class GnuLikeDynamicLinkerMixin: + # Need to deduplicate rpaths, as macOS's install_name_tool + # is *very* allergic to duplicate -delete_rpath arguments + # when calling depfixer on installation. +- all_paths = mesonlib.OrderedSet([os.path.join(origin_placeholder, p) for p in processed_rpaths]) ++ if not env.is_cross_build(): ++ all_paths = mesonlib.OrderedSet([os.path.join(origin_placeholder, p) for p in processed_rpaths]) ++ else: ++ all_paths = mesonlib.OrderedSet() + # Build_rpath is used as-is (it is usually absolute). + if build_rpath != '': + all_paths.add(build_rpath) +@@ -539,7 +542,8 @@ class GnuLikeDynamicLinkerMixin: + paths = padding + else: + paths = paths + ':' + padding +- args.extend(self._apply_prefix('-rpath,' + paths)) ++ if paths: ++ args.extend(self._apply_prefix('-rpath,' + paths)) + + # TODO: should this actually be "for solaris/sunos"? + if mesonlib.is_sunos(): diff --git a/patches/meson-0.53.1/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch b/patches/meson-0.53.1/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch new file mode 100644 index 000000000..ed84af3b6 --- /dev/null +++ b/patches/meson-0.53.1/0003-HACK-don-t-loose-the-rpath-for-host-packages.patch @@ -0,0 +1,44 @@ +From: Michael Olbrich +Date: Mon, 18 Mar 2019 13:04:32 +0100 +Subject: [PATCH] HACK: don't loose the rpath for host packages + +Needed by ptxdist to run tools in sysroot-host + +Signed-off-by: Michael Olbrich +--- + mesonbuild/backend/backends.py | 6 +++++- + mesonbuild/minstall.py | 2 +- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py +index 2a07058a62f8..60708cafeacc 100644 +--- a/mesonbuild/backend/backends.py ++++ b/mesonbuild/backend/backends.py +@@ -1088,9 +1088,13 @@ class Backend: + # Done separately because of strip/aliases/rpath + if outdirs[0] is not False: + mappings = t.get_link_deps_mapping(d.prefix, self.environment) ++ if not t.install_rpath and not self.environment.is_cross_build(): ++ install_rpath = None ++ else: ++ install_rpath = t.install_rpath + i = TargetInstallData(self.get_target_filename(t), outdirs[0], + t.get_aliases(), should_strip, mappings, +- t.install_rpath, install_mode) ++ install_rpath, install_mode) + d.targets.append(i) + + if isinstance(t, (build.SharedLibrary, build.SharedModule, build.Executable)): +diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py +index b1a55e5a78f0..541068b49f51 100644 +--- a/mesonbuild/minstall.py ++++ b/mesonbuild/minstall.py +@@ -487,7 +487,7 @@ class Installer: + print("Symlink creation does not work on this platform. " + "Skipping all symlinking.") + printed_symlink_error = True +- if os.path.isfile(outname): ++ if os.path.isfile(outname) and install_rpath is not None: + try: + depfixer.fix_rpath(outname, install_rpath, final_path, + install_name_mappings, verbose=False) diff --git a/patches/meson-0.53.1/0004-HACK-enable-NEON-only-for-ARMv7.patch b/patches/meson-0.53.1/0004-HACK-enable-NEON-only-for-ARMv7.patch new file mode 100644 index 000000000..f6f0dc448 --- /dev/null +++ b/patches/meson-0.53.1/0004-HACK-enable-NEON-only-for-ARMv7.patch @@ -0,0 +1,25 @@ +From: Michael Olbrich +Date: Tue, 1 Oct 2019 22:30:59 +0200 +Subject: [PATCH] HACK: enable NEON only for ARMv7 + +NEON detection is broken, so just skip it for anything that is not ARMv7. + +Signed-off-by: Michael Olbrich +--- + mesonbuild/modules/unstable_simd.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mesonbuild/modules/unstable_simd.py b/mesonbuild/modules/unstable_simd.py +index 4c066fb91339..e4b1824a7087 100644 +--- a/mesonbuild/modules/unstable_simd.py ++++ b/mesonbuild/modules/unstable_simd.py +@@ -62,6 +62,9 @@ class SimdModule(ExtensionModule): + continue + iset_fname = kwargs[iset] # Might also be an array or Files. static_library will validate. + args = compiler.get_instruction_set_args(iset) ++ cpu = state.environment.machines.host.cpu ++ if iset == 'neon' and not cpu.startswith('armv7'): ++ args = None + if args is None: + mlog.log('Compiler supports %s:' % iset, mlog.red('NO')) + continue diff --git a/patches/meson-0.53.1/series b/patches/meson-0.53.1/series new file mode 100644 index 000000000..e6ca14c3f --- /dev/null +++ b/patches/meson-0.53.1/series @@ -0,0 +1,7 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch +0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch +0003-HACK-don-t-loose-the-rpath-for-host-packages.patch +0004-HACK-enable-NEON-only-for-ARMv7.patch +# 3d7acfa5e27658c133f3d4f6976b1453 - git-ptx-patches magic -- cgit v1.2.3