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

Can't build: "`CFLAGS' has changed since the previous run"



The problem you're seeing is because of a disagreement about trailing  
spaces.  Here's a script which I run from the top of the newlib  
source tree before running configure.  The script adds some commands  
to each configure script to strip trailing spaces before comparing  
the values.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixNewlibConfigureForOSX
Type: application/octet-stream
Size: 288 bytes
Desc: not available
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/20070504/560aeab0/attachment.obj 
-------------- next part --------------

BTW -- are you building on OS X?  That's where I encountered this  
problem.

On May 4, 2007, at 3:49 AM, Ralf Corsepius wrote:

> On Thu, 2007-05-03 at 20:00 +0000, Vivian Paola Guerrero Rodriguez
> wrote:
>>
>>
>>> Hi, i'm trying to build gcc 4.1.1 with binutils 2.17 and newlib  
>>> 1.15.0 ,
>>> i'm following the steps described on-line library  4.1.4.2: Using  
>>> configure
>>> and make.
>> When i 'm doing "Configuring and Building GCC and NEWLIB" newlib  
>> fails  with
>> this odd message:
>>
>> configure: loading cache .././config.cache
>> configure: error: `CFLAGS' has changed since the previous run:
>> configure:   former value:  -O2 -g -O2
>> configure:   current value: -O2 -g -O2
>> configure: error: changes in the environment can compromise the build
>> configure: error: run `make distclean' and/or `rm .././ 
>> config.cache' and
>> start over
>> configure: error: /bin/sh
>> '/home/vguerrero/tools-rtems/gcc-4.1.1/newlib/libc/configure'  
>> failed for
>> libc
>> make[1]: *** [configure-target-newlib] Error 1
>> make[1]: se sale del directorio `/home/vguerrero/b-gcc'
>> make: *** [all] Error 2
>>
>> So, I  found a  solution that consist in change two lines of the  
>> MakeFile.in
>> of newlib:
>>
>> -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
>> +CFLAGS_FOR_TARGET = $(strip -O2 $(CFLAGS) $ 
>> (SYSROOT_CFLAGS_FOR_TARGET))
>> and
>> -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
>> +CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $ 
>> (SYSROOT_CFLAGS_FOR_TARGET))
>>
>> but these lines doesn't fix the problem.
> .. yes this is only part of the story.
>
>> What am I doing grown
> Not using one of the prebuilt toolchains ... ;)
>
>> ? is there another solution for this problem?
> Not quite, but it's all in the RTEMS gcc and newlib patches.
>
> Ralf
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users

-- 
Eric Norum <norume at aps.anl.gov>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793