matricks/bam

flag order when linking

Closed this issue · 1 comments

ld/gcc requires for some linker flags (like "-Wl,--as-needed")
that they are passed before the libraries in the command line.
If passed at the end these flags don't have an effect.

So for example in src/drver_gcc.lua
local e = e .. settings.link.flags:ToString()
should be moved before
local e = e .. TableToString(settings.link.libs, '-l', ' ')

use settings.link.inputflags