Fix linker issue on master
On some systems (incl. our x86_64 Debian based CI), the change of the
linker argument order in 602c4ce0 broke the build, as the flag was then
passed after the library options (i.e. -lc -lm -lpthread
).
This change removes the modifications to the LDFLAGS
and LDFLAGS_PRE
variables in build.mk
by making use of the LDFLAGS_EXECUTABLE
and
LDFLAGS_LIB
variables directly in dedicated linker commands.
An additional variable LDFLAGS_PRE_LIB
is introduced for adding
preceding flags specifically for the library build (as LDFLAGS_PRE
is
not touched anymore in build.mk
).