This reverts commit 274d46ace0
.
Sorry, the original commit was correct after all. It allows has the
correct link order and supports static-linking also.
Just a reminder: it is important to give a (brief) rationale of the
patch intentions.
master