On a system where multiple MinGW cross toolchains are installed (e.g. one by the distro and one self-compiled), NSIS might pick the wrong one.
The attached patch solves this issue by providing a way to specify the toolchain prefix to use (MINGW_CROSS_PREFIX).
See also: http://lists.nongnu.org/archive/html/mingw-cross-env-list/2011-05/msg00021.html
allow to specify the mingw cross toolchain via MINGW_CROSS_PREFIX
A fix for the reported bug was committed into the subversion repository (revision 6156).
The command line option XGCC_W32_PREFIX could be used to explicitly select a specific win32 targeted cross compiler. The value of XGCC_W32_PREFIX has to be the prefix of the toolchain. For example XGCC_W32_PREFIX=i686-w64-mingw32 would deploy the win32 targeted MinGW-w64 cross compiler if it is available on the build system.