Can't build: "`CFLAGS' has changed since the previous run"
Ralf Corsepius
ralf.corsepius at rtems.org
Fri May 4 08:49:38 UTC 2007
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
More information about the users
mailing list