# stage2: fix not detecting all dynamic libraries · gitcafe/zig

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

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

Visibility: public

Requested revision: a9b7d8fa07ec0b85a8d13c914cfed0d4c99942b8

Requested commit: a9b7d8fa07ec0b85a8d13c914cfed0d4c99942b8

Commit: a9b7d8fa07ec0b85a8d13c914cfed0d4c99942b8

Tree: c5eb3abbb4250cafde63cbb8a6a57e13c3d089a9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: fix not detecting all dynamic libraries

Positional shared library arguments were not being detected as causing
dynamic linking, resulting in invalid linker lines. LLD did not have an
error message for this when targeting x86_64-linux but it did emit an
error message when targeting aarch64-linux, which is how I noticed the
problem.

This surfaced an error having to do with fifo.pipe() in the cat example
which I did not diagnose but solved the issue by doing the revamp that
was already overdue for that example.

It appears that the zig-window project was exploiting the previous
behavior for it to function properly, so this prompts the question, is
there some kind of static/dynamic executable hybrid that the compiler
should recognize? Unclear - but we can discuss that in #7240.

```

## Parents

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

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