I'm unsure if this is a binutils-specific issue or not, since I'm told that gcc-related projects use their own configuration environment. But I noticed the following when attempting to compile binutils...
config.h was not being created correctly on my Windows 7 (x86_64) machine using the latest released tools from msys/mingw, causing all sorts of build problems. After investigating the issue, it was narrowed down to a problem with how config.status produces and then uses defines.awk. That awk file uses a regular expression that looks for lines like "#undef VALUE_HERE" to eventually change them to "#define VALUE_HERE 1" if configure deems it so, but it wasn't finding them due to mismatches from Windows-style line endings. This patch (attached as well) fixes the issue in defines.awk, but I'm unsure of where it really needs to go (because defines.awk is created by config.status, itself created through configure) since I'm not an autotools expert: --- defines-orig.awk Thu Sep 2 15:52:10 2010 +++ defines.awk Thu Sep 2 15:56:01 2010 @@ -51,8 +51,9 @@ for (key in D) D_is_set[key] = 1 FS = " " } -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|\r$)/ { line = $ 0 + sub(/\r$/, "", line) split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] Perusing the repo., it seems that the fix could go here (but again, I'm unsure due to lack of experience): http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob;f=lib/autoconf/status.m4;hb=HEAD#l830 Hope this helps. Thanks, - David Hoyt
defines.awk.patch
Description: defines.awk.patch