This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting glibfortran to build on newlib targets aka. missing stdint.h (PR 14325)


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]