This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Getting glibfortran to build on newlib targets aka. missing stdint.h (PR 14325)
- From: Tom Tromey <tromey at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: 08 Nov 2004 13:40:58 -0700
- Subject: Re: Getting glibfortran to build on newlib targets aka. missing stdint.h (PR 14325)
- References: <Pine.BSF.4.58.0410142210500.10949@dair.pair.com>
- Reply-to: tromey at redhat dot com
>>>>> "H-P" == Hans-Peter Nilsson <hp@bitrange.com> writes:
H-P> I'd like to be able to build libgfortran on cross targets that
H-P> use newlib, not see a build breakage like now, whenever MPFR
H-P> and gmp are present:
H-P> /home/hp/combined/combined/libgfortran/runtime/environ.c:26:
H-P> /home/hp/combined/combined/libgfortran/libgfortran.h:79: error:
H-P> syntax error before 'GFC_INTEGER_4'
H-P> /home/hp/combined/combined/libgfortran/libgfortran.h:79:
H-P> warning: type defaults to 'int' in declaration of
H-P> 'GFC_INTEGER_4'
H-P> The issue is use of stdint.h types like int32_t, as noted in
H-P> PR libfortran/14325.
H-P> Three ways to fix this:
H-P> [ ... ]
How about defining these types using gcc-specific mode attributes?
This is what libgcj does for jni.h.. E.g.:
typedef int GFC_INTEGER_4 __attribute__ ((__mode__ (__SI__)));
This is portable and has the advantage of not needing any configury.
Tom