# stage2: make \-lgcc_s additionally link libunwind · gitcafe/zig

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

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

Visibility: public

Requested revision: 88d1258e08e668e620d5f8f4681315e555acbcd2

Requested commit: 88d1258e08e668e620d5f8f4681315e555acbcd2

Commit: 88d1258e08e668e620d5f8f4681315e555acbcd2

Tree: 930e8dabe93e60af9fc4f0e54c17e07db2672aa1

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: make -lgcc_s additionally link libunwind

Previously, Zig ignored -lgcc_s with a warning that this dependency is
redundant because it is satisfied by compiler-rt. However, sfackler
pointed out that it also provides exception handling functions. So if
Zig sees -lgcc_s on the linker line, it needs to fulfill this dependency
with libunwind.

I also made link_libc inferred to be on if libunwind is linked since
libunwind depends on libc.

```

## Parents

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

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