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

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



On Mon, 2005-02-21 at 07:02 -0500, Peter Dufault wrote:
> On Feb 21, 2005, at 12:21 AM, Ralf Corsepius wrote:
> 
> > Just do not set CC in the environment. Setting CC in the environment
> > means asking for trouble - In all configurations, not only RTEMS.
> >
> >
> I'll change it, does this work with all the tool configurations?
I don't understand this question.

In general, each configure script takes "CC" if it is set and propagates
this value to the Makefiles. This is how each single configure script
works.

i.e.
export CC=xxx-gcc
./configure

will cause the Makefile being generated by configure to contain
CC=xxx-gcc
no matter which --build/host/target flags you are using.

Also, if you set CC in your environment, the value encoded into the
Makefile could be overridden from your environment variable or from
other Makefiles (cf. man make, option -e).

In complex packages, like RTEMS or GCC which support cross-compilation
the situation is more complex, because the meaning of "CC" is unclear
and changes in individual Makefiles. Depending on which sub-tree you're
in it can be the build/host or target CC.

Normally, environment variables do not override make variables, so
setting CC in the environment should not expose any problems, but ...

... I would not exclude handling of CC to be broken in RTEMS toplevel
configure script, but similar to other problems you are reporting, I
can't reproduce them, nor am I aware of any problem related to setting
up CC.

Ralf