meson: 0.46.1 → 0.48.2

This commit is contained in:
Jan Tojnar
2018-11-13 14:39:34 +01:00
parent 6141939d6e
commit 340dd80175
4 changed files with 39 additions and 13 deletions
@@ -1,6 +1,15 @@
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -846,8 +848,10 @@
@@ -1112,6 +1112,8 @@
for p in rpath_paths:
if p == from_dir:
relative = '' # relpath errors out in this case
+ elif os.path.isabs(p):
+ relative = p # These can be outside of build dir.
else:
relative = os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir))
rel_rpaths.append(relative)
@@ -1121,8 +1123,10 @@
if paths != '':
paths += ':'
paths += build_rpath
@@ -15,7 +24,7 @@
else:
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -300,6 +300,14 @@
@@ -303,6 +303,14 @@
return
self.bf.seek(rp_off)
old_rpath = self.read_str()
@@ -30,3 +39,14 @@
if len(old_rpath) < len(new_rpath):
sys.exit("New rpath must not be longer than the old one.")
# The linker does read-only string deduplication. If there is a
@@ -316,6 +324,10 @@
if not new_rpath:
self.remove_rpath_entry(entrynum)
else:
+ # clean old rpath to avoid stale references
+ # (see https://github.com/NixOS/nixpkgs/pull/46020)
+ self.bf.seek(rp_off)
+ self.bf.write(b'\0'*len(old_rpath))
self.bf.seek(rp_off)
self.bf.write(new_rpath)
self.bf.write(b'\0')