This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: Use $(COMPILER) to build objects
- From: Ian Lance Taylor <iant at google dot com>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 May 2009 08:40:11 -0700
- Subject: Re: PATCH RFA: Use $(COMPILER) to build objects
- References: <email@example.com> <20090521085546.GD9436@gmx.de>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> * Ian Lance Taylor wrote on Thu, May 21, 2009 at 07:54:24AM CEST:
>> 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).
> FWIW, I don't see any problems with this patch (I cannot approve it),
> but this scheme will probably not extend cleanly over to Automake-
> generated makefiles. That may not be a problem for GCC at all, I just
> thought I'd mention it.
Automake permits you to override the .c.o target. You're right that we
can't take full advantage of automake if we name C++ files with a .c
extension, but I think that is OK for the foreseeable future.