This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: Add --enable-build-with-cxx to gcc subdirectory


Paolo Bonzini <bonzini@gnu.org> writes:

> Ok, can you just explain this?
>
>> +COMPILER_FLAGS = $(filter-out -fkeep-inline-functions,$(CXXFLAGS))
>> +LINKER_FLAGS = $(filter-out -fkeep-inline-functions,$(CXXFLAGS))

The top level configure.ac adds -fkeep-inline-functions to
stage1_cflags.  The toplevel Makefile.in sets stage1_cxxflags to
stage1_cflags.  This is intended to be a check to catch problems with
compilers which always emit a copy of an inline function.  However,
this is completely wrong for C++, and in particular gmp.h has inline
functions when compiling with C++.  Emitting a copy of them in each .o
file is wrong.  A C++ compiler will always handle inline predictably,
so there is no need to do this check for C++.

Do you mean that the patch is OK with that explanation?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]