about summary refs log tree commit diff
path: root/library/std/src/sys/unix/process/process_unix.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-20 07:08:41 +0200
committerGitHub <noreply@github.com>2023-07-20 07:08:41 +0200
commit8027dd95cf37e7bb9ad54541f5fa5460805380a7 (patch)
tree32c563a73d129f458f74be85d6e98da971485b54 /library/std/src/sys/unix/process/process_unix.rs
parent0646a5d1aa3745cb448db247f6fa432890a1812b (diff)
parente326e1ad18acf4ae598b02228232bfd76e3a7fa6 (diff)
downloadrust-8027dd95cf37e7bb9ad54541f5fa5460805380a7.tar.gz
rust-8027dd95cf37e7bb9ad54541f5fa5460805380a7.zip
Rollup merge of #113710 - loongarch-rs:fix-rpath, r=clubby789
Fix rpath for libdir is specified

## What does this PR try to resolve?

When building the Rust toolchain with `--libdir=lib64`, the executable tools such as `rustc` cannot find shared libraries.

```bash
./configure --prefix=/ --libdir=lib64
DESTDIR=/tmp/rust ./x.py install
```

```
$ /tmp/rust/bin/rustc
rustc: error while loading shared libraries: librustc_driver-13f1fd1bc7f7000d.so: cannot open shared object file: No such file or directory
```

This issue is caused by the link args `-Wl,rpath` being different from `--libdir`.

```
$ readelf -d /tmp/rust/bin/rustc | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib]
```

## How to resolve?

When setting the rpath, get it from sysroot libdir relative path.

After this patch:

```
$ readelf -d /tmp/rust/bin/rustc | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib64]
```
Diffstat (limited to 'library/std/src/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions