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 5/5] add libcc1


On Wed, Oct 29, 2014 at 11:53:28AM +0100, Paolo Bonzini wrote:
> >> 2) why is GMPLIB not handled in the same way?
> > 
> > The only problem is that system.h includes gmp.h, so we need a way
> > to find that header.  I think libcc1 doesn't use any functions from gmp
> > itself, so if gmp.h can be included, GMPLIB isn't really needed.
> 
> Ah, got it.  Is it hard to move the inclusion to the actual users?

I think it is hard.  I think it has been moved to system.h very much
intentionally, as including gmp.h only in selected headers was causing lots
of troubles, e.g. because of #pragma GCC poison at the end of system.h,
I believe some gmp.h versions were using some poisoned symbols.
system.h doesn't include gmp.h if -DGENERATOR_FILE, but libcc1 is not a
generator, so that is not appropriate, it can use various other GCC headers
that are not suitable for generators.  GMPINC has been suggested by Joseph,
I'd think if we ever need also GMPLIB, we'd clearly see it as link failures
of libcc1 first and could add it only when really needed.

	Jakub


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