I'm currently writing a python C module which has a chained dependency:
- mymodule requires libb
- libb requires liba
To that effect, within setup.py, I link against both liba and libb
Also, as I'm working on Ubuntu, I want to add -Wl,--no-as-needed to make sure that the symbols not immediately needed will still be stripped.
However, it seems that the extra_link_args are systematically appended at the end of the link line, but for this to work, the '-Wl,--no-as-needed' argument need to be *before* the link against my two libraries.
How can I choose the order of my link arguments that I pass to gcc using setup.py ?