target/build CFLAGS mixup when cross-emerging due to bug or my stupidity?

view full story

http://unix.stackexchange.com – I'm trying to emerge LLVM using emerge from a crossdev (for ARM) overlay in Gentoo. I've set the CFLAG of the overlay to optimise for arm (-march=armv6j), which seems to make ./configure fail on the "checking for executable suffix on build platform" with the message "error: installation or configuration problem: compiler cannot create executables" due to "bad value (armv6j) for -march= switch"; suggesting that it is trying to use the CFLAGS of the crossdev overlay even when not cross compiling. My question is if this is most likely due to a bug in the ebuild/package/llvm or due to me being si (HowTos)