The answer was provided by a kind member of SO C++ chat.
It looks like this behaviour is caused by a bug in gcc.
The workaround provided in the last comment of that bug discussion does work and solves the issue:
-Wl,--no-as-needed
The answer was provided by a kind member of SO C++ chat.
It looks like this behaviour is caused by a bug in gcc.
The workaround provided in the last comment of that bug discussion does work and solves the issue:
-Wl,--no-as-needed