This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross builds to avr fail
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 12 Nov 2005 22:04:29 +0100
- Subject: Re: cross builds to avr fail
- References: <Pine.LNX.4.63.0511122130070.6049@t148.fhfr.qr>
> Building a --target=avr compiler currently fails because
>
> /usr/src/packages/BUILD/gcc-4.1.0-20051110/obj-x86_64-suse-linux/./gcc/xgcc
> -B/usr/src/packages/BUILD/gcc-4.1.0-20051110/obj-x86_64-suse-linux/./gcc/
> -B/opt/cross/avr/bin/ -B/opt/cross/avr/lib/ -isystem
> /opt/cross/avr/include -isystem /opt/cross/avr/sys-include -O2 -O2 -O2
> -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -U_FORTIFY_SOURCE
> -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition -isystem ./include -DDF=SF
> -Dinhibit_libc -mcall-prologues -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -Dinhibit_libc -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include
> -I../../gcc/../libcpp/include -DL_ashrdi3 -c ../../gcc/libgcc2.c -o
> libgcc/./_ashrdi3.o ../../gcc/libgcc2.c: In function '__muldi3':
> ../../gcc/libgcc2.c:511: error: total size of local objects too large
>
> which does not make any sense. The above is for a x86_64 host, but I
> see this errors everywhere.
I guess the sanity check I've added doesn't apply to micro-controllers. Try
the attached patch.
--
Eric Botcazou
Index: function.c
===================================================================
--- function.c (revision 106821)
+++ function.c (working copy)
@@ -479,7 +479,8 @@ assign_stack_local_1 (enum machine_mode
function->x_stack_slot_list
= gen_rtx_EXPR_LIST (VOIDmode, x, function->x_stack_slot_list);
- /* Try to detect frame size overflows. */
+ /* Try to detect frame size overflows on native platforms. */
+#if BITS_PER_WORD >= 32
if ((FRAME_GROWS_DOWNWARD
? (unsigned HOST_WIDE_INT) -function->x_frame_offset
: (unsigned HOST_WIDE_INT) function->x_frame_offset)
@@ -491,6 +492,7 @@ assign_stack_local_1 (enum machine_mode
/* Avoid duplicate error messages as much as possible. */
function->x_frame_offset = 0;
}
+#endif
return x;
}