------- Comment #8 from ro at techfak dot uni-bielefeld dot de 2009-10-22 18:20 ------- Subject: Re: Bootstrap with Sun Studio 12.1 fails
> > 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). > I have no objection to these patches. However I think you said they don't > actually solve the problem right? They are necessary if you fix ansidecl.h to properly handle non-GCC C99 compilers and Sun Studio cc. I have no idea if the Sun compiler is right to error out here, though: that's probably for the reviewer to decide. The other problem is if compilers are allowed to emit code for extern inline functions that are unused: if so, the patches above are not enough and we need to fix either GCC or GMP (unless they argue that it's wrong to include gmp.h, but not to link with -lgmp). > 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.) Fully agreed: linking with -lgmp is just a hack. > 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. Seems like a good approach to me. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41771