On 2/4/06, Ralf Corsepius <[EMAIL PROTECTED]> wrote: > On Fri, 2006-02-03 at 09:45 -0600, Joel Sherrill wrote: > > >>>The problem is with using stdint.h integer types without checking if > > >>>they are actually > > >>>available. I have posted a fix for this already that needs to be > > >>>reviewed. Along with > > >>>some other fixes for similar target OS dependent bugs. Patch is here: > > >>>http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00032.html > > >>>(and this is PR26050). > > >>> > > >>> > > > > After running autoconf, it fails a bit differently. Output below my > > signature. > I can reproduce the breakdown ... > > > But something doesn't seem right. *-rtems* and other newlib targets > > have a stdint.h. > > Right, but .. AFAIS, this issue isn't related to stdint.h, but to > sys/types.h > > > In file included from > > ../../../../gcc/libgcc-math/i386/../flt-32/e_acosf.c:21: > > ../../../../gcc/libgcc-math/i386/../include/math_private.h:58: error: > > expected specifier-qualifier-list before 'uint32_t' > > ../../../../gcc/libgcc-math/i386/../include/math_private.h:129: error: > > expected specifier-qualifier-list before 'uint32_t' > > ../../../../gcc/libgcc-math/i386/../include/math_private.h:182: error: > > expected '=', ',', ';', 'asm' or '__attribute__' before '__ieee754_rem_pio2' > > ../../../../gcc/libgcc-math/i386/../include/math_private.h:190: warning: > > type defaults to 'int' in declaration of 'int32_t' > > ../../../../gcc/libgcc-math/i386/../include/math_private.h:190: error: > > expected ';', ',' or ')' before '*' token > [..] > > control reaches end of non-void function > > make[3]: *** [libsse2_la-e_acosf.lo] Error 1 > > make[2]: *** [all-recursive] Error 1 > > make[1]: *** [all-target-libgcc-math] Error 2 > > make: *** [all] Error 2 > > IMO, the cause is obvious: > > To retrieve fixed-size types, libgcc-math/include/math_private.h > includes <sys/types.h> and expects it to provide u_int32_t and int32_t. > > This assumption holds on BSD compatible systems, where sys/types.h > provides these types, but according to POSIX this assumption is invalid, > c.f. > http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html
Correct, so the solution in the patch I refered to is to use _stdint.h which is created by configure (either just wrapping an existing stdint.h or by creating the necessary types) instead of sys/types.h. The _stdint.h should provide the C99 uint32_t (to which all u_int32_t are changed) and int32_t. So either the patch apply didn't work out completely (there should be a _stdint.h file in obj/xxx/libgcc-math/), or the issue is different. I put a complete patch with all fixes including all generated files at http://www.suse.de/~rguenther/p Richard.