trying to build libgfortran for arm-elf dies with the error In file included from /work/rearnsha/gnusrc/gcc-tree-ssa-cross/libgfortran/runtime/environ.c:26: /work/rearnsha/gnusrc/gcc-tree-ssa-cross/libgfortran/libgfortran.h:75: error: parse error before "GFC_INTEGER_4" This is because int32_t (a c99 type) is not defined by newlib.
Confirmed but really newlib should be providing these.
Is this not fixed by this: +2004-05-06 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + Steven Bosscher <stevenb@suse.de> + + PR libfortran/15234 + * libgfortran.h: Include <inttypes.h> if available. ?
No, newlib doesn't provide <inttypes.h>. It defines int32_t if __MS_types__ is defined. I have no idea why it doesn't always. [When I tried this yesterday, the C compiler segfaulted after a page full of parse errors.]
In reallity it is GCC's job to include a stdint.h header which is PR 448.
Arm is fixed but not all targets which use newlib by (because some targets are LP64 aka MMIX): * acinclude.m4 (LIBGFOR_TARGET_ILP32): New check. * configure.ac: Include LIBGFOR_TARGET_ILP32. * configure: Regenerate. * config.h.in: Likewise. * libgfortran.h: Provide default definitions for C99 types on ILP32 targets that don't have them.
Shouldn't this one be fixed by the patch for PR15234?
> Shouldn't this one be fixed by the patch for PR15234? ping
This was fully fixed by the patch which fixed PR 25259. Also IIRC newlib provides a stdint.h now too.