This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: Use $(COMPILER) to build objects
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 24 May 2009 18:58:58 +0200
- Subject: Re: PATCH RFA: Use $(COMPILER) to build objects
- References: <email@example.com>
Ian Lance Taylor wrote:
> This is a preliminary step toward supporting a configure option to build
> gcc using either a C compiler or a C++ compiler. I think it would lead
> to long term confusion to use $(CC) in a Makefile to represent a C++
> compiler. This patch instead arranges to compile all code using
> $(COMPILER). CFLAGS changes to COMPILER_FLAGS and ALL_CFLAGS changes to
> ALL_COMPILERFLAGS. The COMPILER make variable is currently always set
> to $(CC); my intent is that in the future, a configure option will
> permit it to be set to either $(CC) or $(CXX).
I am not sure it is a good idea. The main reason is that I think this
--enable-cxx-for-cc option should be in gcc, not in the toplevel. I
don't see any problem with CC representing a C++ compiler, since it is
used to compile C/C++-common-subset code.