| 1 | This patch provides a roundabout way of keeping "$prefix/..", i.e. the store
|
| 2 | directory, in DT_RPATH/DT_RUNPATH. See <https://issues.guix.gnu.org/70349>
|
| 3 | for motivation.
|
| 4 |
|
| 5 | Upstream-Status: Not submitted.
|
| 6 |
|
| 7 | |
| 8 | |
| 9 | @@ -1826,6 +1826,7 @@ class BuildTarget(Target):
|
| 10 | def rpaths_for_non_system_absolute_shared_libraries(self, exclude_system: bool = True) -> ImmutableListProtocol[str]:
|
| 11 | paths: OrderedSet[str] = OrderedSet()
|
| 12 | srcdir = self.environment.get_source_dir()
|
| 13 | + vicinity = os.path.dirname(self.prefix)
|
| 14 |
|
| 15 | system_dirs = set()
|
| 16 | if exclude_system:
|
| 17 | @@ -1840,7 +1841,7 @@ class BuildTarget(Target):
|
| 18 | if dep.type_name not in {'library', 'pkgconfig', 'cmake'}:
|
| 19 | continue
|
| 20 | for libpath in dep.link_args:
|
| 21 | - if libpath.startswith('-'):
|
| 22 | + if libpath.startswith('-') or libpath.startswith(vicinity):
|
| 23 | continue
|
| 24 | # For all link args that are absolute paths to a library file, add RPATH args
|
| 25 | if not os.path.isabs(libpath):
|