autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "has changed since the previous run"


From: Ralf Wildenhues
Subject: Re: "has changed since the previous run"
Date: Thu, 1 Feb 2007 03:16:13 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* DJ Delorie wrote on Thu, Feb 01, 2007 at 12:58:11AM CET:
> 
> > In which cases do you see these, and what's the cause for the changed
> > white space?
> 
> The latest case I'm seeing is:
> 
> configure: loading cache ../.././config.cache
> configure: error: `CXXFLAGS' has changed since the previous run:
> configure:   former value:  -g -O2  -D_GNU_SOURCE
> configure:   current value: -g -O2 -D_GNU_SOURCE

This is not enough information to go by.  Is this caused by a
  ./config.status --recheck

or by one configure script executing another one while sharing the cache
file?

> The problem is code like this:
> 
> GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX,
>               [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f 
> $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) 
> $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` 
> -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src 
> -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
>               c++)
> 
> where the code in `...` may or may not produce output.  If it doesn't,
> the result gets two spaces in it.

Wait a minute: does the code, when run the first time, produce output,
and when run the second time, doesn't (or vice versa)?

I think long-term it's more useful to make the code that calls the sub
configure scripts safe for multiple white space.  At least that way the
number of spots you need to touch are limited.  I think if you don't use
AC_CONFIG_SUBDIRS then it should work with 2.59 even, because the
recheck code was safe already then.  Just the subdirs code wasn't.

> Consider also:
> 
> CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
> CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
> 
> If $(SYSROOT_CFLAGS_FOR_TARGET) is empty, you get a trailing space.
> 
> Likewise, my current gotcha is from this line in config/mt-gnu:
> 
> CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -D_GNU_SOURCE

I don't think you'll be able to eliminate all possible instances of
consecutive spaces: the user could still add them.  Make sure your
calling sub configure scripts doesn't ever lose any consecutive or
trailing white space.  You may want to look at the current
_AC_OUTPUT_SUBDIRS,
<http://cvs.savannah.gnu.org/viewcvs/autoconf/lib/autoconf/status.m4?root=autoconf&view=log>

Do you think that is feasible for GCC?  I know it far too little to be
able to judge.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]