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

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

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

Visibility: public

Requested revision: 429a219f42c93957dee41021a22547549a8c54a2

Requested commit: 429a219f42c93957dee41021a22547549a8c54a2

Commit: 429a219f42c93957dee41021a22547549a8c54a2

Tree: 43cd5f8a742d0d936e4f09cf9d31af344b7b0444

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

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

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