[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: config.status produces incompatible defines.awk and config.h
From: |
Eric Blake |
Subject: |
Re: config.status produces incompatible defines.awk and config.h |
Date: |
Fri, 03 Sep 2010 10:11:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
On 09/02/2010 05:30 PM, Hoyt, David wrote:
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.
Thanks for the report. Autoconf already has some attempted support for
CRLF line endings in config.status, but it has had issues over time.
Which version of autoconf are you dealing with? It may be that you are
facing an issue with gcc using an older version of autoconf, where
upgrading to a newer version would resolve things.
Also, have you considered using binary-mode mounts under cygwin, rather
than text-mode mounts under msys? That right there would eliminate your
CR issues, although it implies a different set of cross-compilation
issues to deal with. That's probably straying outside what this list
can support, but I know there are better forums out there for people who
are actively working on development of gcc for various windows targets.
+++ 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)
As written, this patch is not portable. Rather, if the current
autoconf.git does not already address the issue, then you will need to
use the same approach as is already in lib/autoconf/status.m4; notice
how $ac_cr and $ac_cs_awk_cr are used to find a portable spelling of CR
that will work for whichever awk will be processing the define script.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org