Problem is CC environment var. (was Re: Something screwed up in PROJECT_ROOT or PROJECT_TOPdir)

Ralf Corsepius ralf.corsepius at rtems.org
Mon Feb 21 05:21:54 UTC 2005


On Sun, 2005-02-20 at 08:27 -0500, Peter Dufault wrote:
> RTEMS is now building (at least it started building and has been 
> building for a while now) after I added CC_FOR_TARGET and 
> CXX_FOR_TARGET to the configuration.
> 
> My problem is that I wrap my configuration with "CC=gcc34" or 
> "CC=gcc33", etc, so I can modify what gets built with what host 
> compiler.  For example, gdb 5.2 needs gcc33 while I'm building all 
> other host stuff with gcc34.
> 
> I just checked the RTEMS configure, and it specifies "CC_FOR_HOST", not 
> "CC".
It uses CC_FOR_BUILD, CC_FOR_HOST and CC_FOR_TARGET in its toplevel
configuration.

CC is used locally and is being set to one of CC_FOR_BUILD, CC_FOR_HOST
or CC_FOR_TARGET, depending on whether a configuration subdir is being
built for build, host or target.

If you set CC in the environment, this will override the CC being using
inside of a Makefile when invoking make in a subdirectory.

>   Maybe someplace in multilib it must decide to use "CC" as the 
> target compiler if it is set and "CC_FOR_TARGET" isn't? 
Not quite. The toplevel configure script sets CC to one of CC_FOR_*.


>  I'm pretty 
> sure this is new behavior since I think I've always done this, but I 
> won't swear to it.
Just do not set CC in the environment. Setting CC in the environment
means asking for trouble - In all configurations, not only RTEMS.

Ralf





More information about the users mailing list