This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/5] add libcc1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Phil Muldoon <pmuldoon at redhat dot com>, DJ Delorie <dj at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2014 11:59:49 +0100
- Subject: Re: [PATCH 5/5] add libcc1
- Authentication-results: sourceware.org; auth=none
- References: <54385676 dot 4000004 at redhat dot com> <5449FC98 dot 1060404 at redhat dot com> <544A8162 dot 1090107 at redhat dot com> <544E9CE5 dot 602 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1410281315200 dot 3342 at digraph dot polyomino dot org dot uk> <544FD432 dot 8090004 at redhat dot com> <20141029102817 dot GP10376 at tucnak dot redhat dot com> <5450C376 dot 6000206 at gnu dot org> <20141029105132 dot GS10376 at tucnak dot redhat dot com> <5450C728 dot 3080004 at gnu dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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