summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-03-18 10:43:44 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-03-19 07:00:18 +0100
commita5454181d40ec5a95e9c926de6579d5df567b919 (patch)
treedf77d4a61020246476b7ff1c3430869a28fc09d1 /patches
parent5fe35e0ffaa530bbf8432abdd886bc413fe80233 (diff)
downloadptxdist-a5454181d40ec5a95e9c926de6579d5df567b919.tar.gz
ptxdist-a5454181d40ec5a95e9c926de6579d5df567b919.tar.xz
host-meson: add some patches to avoid unnecessary rpaths
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/meson-0.49.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch26
-rw-r--r--patches/meson-0.49.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch28
-rw-r--r--patches/meson-0.49.2/series5
3 files changed, 59 insertions, 0 deletions
diff --git a/patches/meson-0.49.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch b/patches/meson-0.49.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch
new file mode 100644
index 000000000..5f32d7790
--- /dev/null
+++ b/patches/meson-0.49.2/0001-only-use-paths-for-shared-libaries-in-get_link_dep_s.patch
@@ -0,0 +1,26 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+---
+ mesonbuild/build.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mesonbuild/build.py b/mesonbuild/build.py
+index 1fcbc04d330a..9f711b39c86a 100644
+--- a/mesonbuild/build.py
++++ b/mesonbuild/build.py
+@@ -753,7 +753,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.49.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch b/patches/meson-0.49.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch
new file mode 100644
index 000000000..04018f115
--- /dev/null
+++ b/patches/meson-0.49.2/0002-don-t-add-rpaths-for-build-directories-when-cross-co.patch
@@ -0,0 +1,28 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+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 <m.olbrich@pengutronix.de>
+---
+ mesonbuild/compilers/compilers.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
+index e27ae2b3b574..8fb4bf0004f1 100644
+--- a/mesonbuild/compilers/compilers.py
++++ b/mesonbuild/compilers/compilers.py
+@@ -1181,7 +1181,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)
diff --git a/patches/meson-0.49.2/series b/patches/meson-0.49.2/series
new file mode 100644
index 000000000..60429c13d
--- /dev/null
+++ b/patches/meson-0.49.2/series
@@ -0,0 +1,5 @@
+# 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
+# 64a38f30e6d78c37e38a2d143fa8ed71 - git-ptx-patches magic