refreshed patch for upgraded meson, rpath patch no longer needed
This commit is contained in:
parent
150d6a80f2
commit
b819f6bd4b
@ -1,68 +1,23 @@
|
|||||||
From 221d6ad64908cec5f9eca85abbb6685e7117d2a4 Mon Sep 17 00:00:00 2001
|
From 3ec508d72b45e65b83610680e4fe31fadb13a8d3 Mon Sep 17 00:00:00 2001
|
||||||
From: brl <bruce@subgraph.com>
|
From: Bruce Leidl <bruce@subgraph.com>
|
||||||
Date: Mon, 18 Dec 2017 14:55:04 -0500
|
Date: Thu, 4 Apr 2019 12:39:12 -0400
|
||||||
Subject: [PATCH] use exe wrapper for custom targets
|
Subject: [PATCH] Use exe wrapper for custom targets
|
||||||
|
|
||||||
---
|
---
|
||||||
mesonbuild/backend/backends.py | 39 ++++++++++++++++++++++++++++++---------
|
mesonbuild/backend/backends.py | 3 +++
|
||||||
1 file changed, 30 insertions(+), 9 deletions(-)
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
|
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
|
||||||
index 3f1e4ced..43091164 100644
|
index 4b9bcb5..f8b8168 100644
|
||||||
--- a/mesonbuild/backend/backends.py
|
--- a/mesonbuild/backend/backends.py
|
||||||
+++ b/mesonbuild/backend/backends.py
|
+++ b/mesonbuild/backend/backends.py
|
||||||
@@ -634,21 +634,42 @@ class Backend:
|
@@ -745,6 +745,9 @@ class Backend:
|
||||||
deps.append(os.path.join(self.build_to_src, sp, 'meson_options.txt'))
|
and no exe wrapper is defined or needs_exe_wrapper is true.
|
||||||
return deps
|
You might want to set it to native instead.'''.format(exe.name))
|
||||||
|
raise MesonException(s)
|
||||||
+
|
+ else:
|
||||||
+ def exe_object_needs_wrapper(self, exe):
|
+ exe_path = os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))
|
||||||
+ return isinstance(exe, build.BuildTarget) and exe.is_cross and \
|
+ return [self.environment.exe_wrapper.get_path(), exe_path]
|
||||||
+ self.environment.is_cross_build() and \
|
if isinstance(exe, build.BuildTarget):
|
||||||
+ self.environment.cross_info.need_exe_wrapper()
|
|
||||||
+
|
|
||||||
+ def wrapped_exe_to_cmd_array(self, exe):
|
|
||||||
+ if 'exe_wrapper' not in self.environment.cross_info.config['binaries']:
|
|
||||||
+ s = 'Can not use target %s as a generator because it is cross-built\n'
|
|
||||||
+ s += 'and no exe wrapper is defined. You might want to set it to native instead.'
|
|
||||||
+ s = s % exe.name
|
|
||||||
+ raise MesonException(s)
|
|
||||||
+
|
|
||||||
+ exe_wrapper = self.environment.cross_info.config['binaries'].get('exe_wrapper')
|
|
||||||
+ exe_path = os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))
|
|
||||||
+ return [exe_wrapper, exe_path]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
def exe_object_to_cmd_array(self, exe):
|
|
||||||
- if self.environment.is_cross_build() and \
|
|
||||||
- self.environment.cross_info.need_exe_wrapper() and \
|
|
||||||
- isinstance(exe, build.BuildTarget) and exe.is_cross:
|
|
||||||
- if 'exe_wrapper' not in self.environment.cross_info.config['binaries']:
|
|
||||||
- s = 'Can not use target %s as a generator because it is cross-built\n'
|
|
||||||
- s += 'and no exe wrapper is defined. You might want to set it to native instead.'
|
|
||||||
- s = s % exe.name
|
|
||||||
- raise MesonException(s)
|
|
||||||
- if isinstance(exe, build.BuildTarget):
|
|
||||||
+ need_wrapper = \
|
|
||||||
+ isinstance(exe, build.BuildTarget) and \
|
|
||||||
+ exe.is_cross and \
|
|
||||||
+ self.environment.is_cross_build() and \
|
|
||||||
+ self.environment.cross_info.need_exe_wrapper()
|
|
||||||
+
|
|
||||||
+ if need_wrapper:
|
|
||||||
+ exe_arr = self.wrapped_exe_to_cmd_array(exe)
|
|
||||||
+ elif isinstance(exe, build.BuildTarget):
|
|
||||||
exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]
|
exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]
|
||||||
else:
|
else:
|
||||||
exe_arr = exe.get_command()
|
|
||||||
+
|
|
||||||
return exe_arr
|
|
||||||
|
|
||||||
+
|
|
||||||
def replace_extra_args(self, args, genlist):
|
|
||||||
final_args = []
|
|
||||||
for a in args:
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
We need to allow our rpaths generated through the compiler flags to make it into
|
|
||||||
our binaries. Therefore disable the meson manipulations of these unless there
|
|
||||||
is a specific directive to do something differently in the project.
|
|
||||||
|
|
||||||
RP 2018/11/23
|
|
||||||
|
|
||||||
Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567]
|
|
||||||
|
|
||||||
Index: meson-0.47.2/mesonbuild/minstall.py
|
|
||||||
===================================================================
|
|
||||||
--- meson-0.47.2.orig/mesonbuild/minstall.py
|
|
||||||
+++ meson-0.47.2/mesonbuild/minstall.py
|
|
||||||
@@ -486,8 +486,11 @@ class Installer:
|
|
||||||
printed_symlink_error = True
|
|
||||||
if os.path.isfile(outname):
|
|
||||||
try:
|
|
||||||
- depfixer.fix_rpath(outname, install_rpath, final_path,
|
|
||||||
- install_name_mappings, verbose=False)
|
|
||||||
+ if install_rpath:
|
|
||||||
+ depfixer.fix_rpath(outname, install_rpath, final_path,
|
|
||||||
+ install_name_mappings, verbose=False)
|
|
||||||
+ else:
|
|
||||||
+ print("RPATH changes at install time disabled")
|
|
||||||
except SystemExit as e:
|
|
||||||
if isinstance(e.code, int) and e.code == 0:
|
|
||||||
pass
|
|
@ -1,10 +1,6 @@
|
|||||||
|
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/meson:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/meson:"
|
||||||
|
|
||||||
# disable-rpath-handling:
|
|
||||||
# https://github.com/mesonbuild/meson/issues/2567
|
|
||||||
# https://github.com/openembedded/openembedded-core/commit/29b5ef236914b152fd255e134569d4a177656bb0
|
|
||||||
SRC_URI += "\
|
SRC_URI += "\
|
||||||
file://0001-use-exe-wrapper-for-custom-targets.patch \
|
file://0001-use-exe-wrapper-for-custom-targets.patch \
|
||||||
file://disable-rpath-handling.patch \
|
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user