Bug 14325 - [libgfortran] libgfortran does not build with newlib on arm-elf (stdint.h does not define the right types)
Summary: [libgfortran] libgfortran does not build with newlib on arm-elf (stdint.h doe...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: tree-ssa
: P2 minor
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on: 448 15234 25259
Blocks: 16991
  Show dependency treegraph
 
Reported: 2004-02-27 16:59 UTC by Richard Earnshaw
Modified: 2006-01-05 03:19 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: arm-elf
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-12-28 06:20:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Earnshaw 2004-02-27 16:59:07 UTC
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.
Comment 1 Andrew Pinski 2004-02-27 17:06:58 UTC
Confirmed but really newlib should be providing these.
Comment 2 Tobias Schlüter 2004-05-14 18:30:57 UTC
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.
?
Comment 3 Daniel Jacobowitz 2004-05-27 13:17:41 UTC
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.]
Comment 4 Andrew Pinski 2004-08-04 07:15:19 UTC
In reallity it is GCC's job to include a stdint.h header which is PR 448.
Comment 5 Andrew Pinski 2004-11-20 15:46:35 UTC
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.
Comment 6 Francois-Xavier Coudert 2005-06-13 16:13:28 UTC
Shouldn't this one be fixed by the patch for PR15234?
Comment 7 Francois-Xavier Coudert 2005-09-05 10:44:42 UTC
> Shouldn't this one be fixed by the patch for PR15234?

ping
Comment 8 Andrew Pinski 2006-01-05 03:19:58 UTC
This was fully fixed by the patch which fixed PR 25259.  Also IIRC newlib provides a stdint.h now too.