PATCH RFA: Use $(COMPILER) to build objects

Paolo Bonzini bonzini@gnu.org
Tue May 26 08:19:00 GMT 2009


> Well, yes.  It seems natural to me to handle this as a top-level
> configure option and as a top-level make variable.  That just seems more
> straightforward, both for use with "make COMPILER=..." and with
> "configure --enable-build-with-c++".

A casual user would expect, however, that COMPILER would be honored by
everyone.  Instead it is just a special variable used by the
build-with-c++ mechanism.

> In general, all the handling of
> compilation tools is done at the top level.  But if you prefer to handle
> this specific case in a config file, I agree that that it should be
> possible to work that way.

Yes, thanks.

Alex's comment on CC from the toplevel overriding CC in the gcc
directory is very important.  While you could probably use "override" or
other make magic, but it's not worth the hassle.  So I approve the gcc/*
changes.

I still don't think you need to handle passing COMPILER and
COMPILER_FLAGS down from the toplevel makefile; you can use
CC/CXX/CFLAGS/CXXFLAGS for that.  Let's keep that part on hold and see
how it works in practice (i.e. after you add and start using the
--enable-build-with-c++ option).

Thanks,

Paolo



More information about the Gcc-patches mailing list