# Fix linker segfault adding rpath to sharedlib · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/30aeb41a19d3ac15c89190cd546cbe7c05c60ac8)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 30aeb41a19d3ac15c89190cd546cbe7c05c60ac8

Requested commit: 30aeb41a19d3ac15c89190cd546cbe7c05c60ac8

Commit: 30aeb41a19d3ac15c89190cd546cbe7c05c60ac8

Tree: 541225ae59e2494310f2da5739498e6c49517179

Author: Ganesan Rajagopal

Committer: Jakub Konka

## Message

```
Fix linker segfault adding rpath to sharedlib

If the shared library is a relative path, dirname will return null causing a segfault. In the case I debugged, the current directory was already in RPATH so just ignoring this case seems a reasonable fix. After this fix "make" and "make test" pass for mimalloc.

Closes #13766
```

## Parents

- [2fce991d2ab1dfc6d591b560607ef0edecc7db19](https://git.cafe/gitcafe/zig/commit/2fce991d2ab1dfc6d591b560607ef0edecc7db19?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/30aeb41a19d3ac15c89190cd546cbe7c05c60ac8?format=markdown)
