This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: h8300-elf build fails in libf2c
- From: Andreas Jaeger <aj at suse dot de>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: gcc-bugs at gcc dot gnu dot org, Toon Moene <moene at knmi dot nl>,Kazu Hirata <kazu at cs dot umass dot edu>
- Date: Sat, 13 Jul 2002 17:46:55 +0200
- Subject: Re: h8300-elf build fails in libf2c
- References: <u8r8i836p5.fsf@gromit.moeb><3D304599.1833531F@moene.indiv.nluug.nl>
Toon Moene <toon@moene.indiv.nluug.nl> writes:
> Andreas Jaeger wrote:
>>
>> Crosscompiling h8300-elf from i686-linux-gnu fails with:
>>
>> checking how to run the C preprocessor... (cached) /mmix/h8300-elf/build/gcc/xgcc -B/mmix/h8300-elf/build/gcc/ -nostdinc -B/mmix/h8300-elf/build/h8300-elf/newlib/ -isystem /mmix/h8300-elf/build/h8300-elf/newlib/targ-include -isystem /mmix/cross-sources/combined/newlib/libc/include -B/mmix/h8300-elf/install/h8300-elf/bin/ -B/mmix/h8300-elf/install/h8300-elf/lib/ -isystem /mmix/h8300-elf/install/h8300-elf/include -L/mmix/h8300-elf/build/ld -E
>> checking for stdio.h... yes
>> checking for built-in g77 integer types... no
>> configure: error: gcc doesn't define all of the built in types __g77_integer,
>> __g77_uinteger, __g77_longint, and __g77_ulongint. You may not be using
>> a new enough version of gcc, or your target may not have type sizes which
>> accommodate those types.
>
> These are defined in c-common.c. I have no idea why some of them might
> not be defined for h8300. Perhaps you can dig further now you know
> where to look ?
Looking at the actual code in c-common.c I see this:
if (TYPE_PRECISION (float_type_node) * 2
== TYPE_PRECISION (long_integer_type_node))
{
g77_longint_type_node = long_integer_type_node;
g77_ulongint_type_node = long_unsigned_type_node;
}
else if (TYPE_PRECISION (float_type_node) * 2
== TYPE_PRECISION (long_long_integer_type_node))
{
g77_longint_type_node = long_long_integer_type_node;
g77_ulongint_type_node = long_long_unsigned_type_node;
}
else
g77_longint_type_node = g77_ulongint_type_node = NULL_TREE;
if (g77_longint_type_node != NULL_TREE)
{
(*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
get_identifier ("__g77_longint"),
g77_longint_type_node));
(*lang_hooks.decls.pushdecl) (build_decl (TYPE_DECL,
get_identifier ("__g77_ulongint"),
g77_ulongint_type_node));
}
Therefore I expect that the precisions of float_type_node and
long_integer_type_node/long_long_integer_type_node are wrong.
Further digging reveals that config/h8300/h8300.h defines:
#define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16)
#define LONG_TYPE_SIZE 32
#define LONG_LONG_TYPE_SIZE 32
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE 32
Ok, that means we cannot bootstrap with Fortran enabled on h8300 -
unless either those defines are changed or G77 can live without
longint (but I do not propose to do this to fix h8300, I'm disabling
fortran now).
Thanks,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj