I managed to solve my problem. It was deep in libtools.m4. It turns out
that they run $LD --help to scan it for "supported targets.*elf". My $LD
had some flags baked in which prevented --help from outputting the correct
message. This resulted in archive_cmds not being set, which made shared
object
Replying to my own question, as I've refined the test case.
This is the updated Makefile.am: https://ghostbin.com/paste/9wj6d.
Note that now the libfrida-agent-glue.so and libfrida-agent-container.so
are not expected to be generated. It seems that they were not generated
with the previous makefil