[Bug bootstrap/41771] Bootstrap with Sun Studio 12.1 fails

ghazi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Oct 22 18:13:00 GMT 2009



------- Comment #7 from ghazi at gcc dot gnu dot org  2009-10-22 18:13 -------
(In reply to comment #6)
> I'm not sure we can claim there is GMP breakage at all: they could argue
> that anyone including <gmp.h> can be expected to link with -lgmp as well.
> I just don't know if it is correct to assume that a function defined as
> extern inline in a header will not be emitted in the object file.

Fair enough, okay.

> Even so, there is breakage in GCC as well:
> * ansidecl.h has a broken test for C99, and incorrectly assumes Sun cc
>   doesn't support extern inline.  The define from inline to nothing causes
>   part of the problem.
> * Three files in the gcc directory declared extern inline call static
>   functions, which causes Sun Studio cc to error out (cf. the attached
>   diff).
>         Rainer

I have no objection to these patches.  However I think you said they don't
actually solve the problem right?

So between link xgcc with -lgmp and don't include gmp.h, I prefer the latter
approach.  Let's not include gmp.h in gcc.c (and anywhere else it isn't
necessary.)

Say I have a silly question, how is gmp.h getting pulled into gcc.c in the
first place?  It's supposed to come in via real.h which should only get
included by middle-end files linking with real.o ...

If we can't disentangle real.h from this then another approach would be to
define GENERATOR_FILE (or likely some new macro name) and avoid including the
problematic headers that way.  Then -D this macro in the gcc.o rule in the
Makefile.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41771



More information about the Gcc-bugs mailing list