@knc1: Ooh, poisoning LDFLAGS with a specific pattern is indeed a nice idea to detect wonky buildsystems :].
Expect libtool to crush your dreams, though, it has a tendency to
try to outsmart you by stripping unknown/broken flags ;/. (I ran into that when switching to LTO, which was all kinds of fun, because of that specific issue of buildsystems misusing CFLAGS/LDFLAGS, or not keeping both at link time, which in turn led me to discover said libtool 'feature').
Haven't found a good way to work-around that, sadly, so I'm currently using
very ugly hacks to
patch Makefiles when I can't use a simple global, semi-standard override (AM_LDFLAGS, IIRC).
TL;DR: As you're starting to see, there's a certain form of masochism involved in anything cross-compile related... ^^.
EDIT: Ah, right, that's also why I couldn't put the libtool-proof flags in LDFLAGS: the basic autotools sanity check fails. So poisoning LDFLAGS has to be done with something 'sane' that won't break at build/link time... Which in turn means you have to pore over build logs with your good friend ag/grep to pinpoint broken buildsystems...