This patch get past message#15's error. Now it goes on to build stage2
gcc and dies running genmodes:

build/genmodes -h > tmp-modes.h
/bin/sh: line 1: 15618 Floating point exception
make[4]: *** [s-modes-h] Error 136
make[4]: Leaving directory `/home/martin/arm/llvm-gcc-4.2-2.5/build-gcc/gcc'

The failing program under gdb:

~/arm/llvm-gcc-4.2-2.5/build-gcc/gcc$ gdb build/genmodes
GNU gdb 6.8-debian
...
This GDB was configured as "arm-linux-gnueabi"...
Breakpoint 1 at 0xa58c
Breakpoint 2 at 0xa528
Breakpoint 3 at 0x87ec
Breakpoint 4 at 0x86cc
(gdb) run -h
Starting program:
/home/martin/arm/llvm-gcc-4.2-2.5/build-gcc/gcc/build/genmodes -h

Program received signal SIGFPE, Arithmetic exception.
0x4006f3e8 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x4006f3e8 in raise () from /lib/libc.so.6
#1  0x0000c1c8 in __div0 ()
    at ../../llvm-gcc-4.2-2.5/gcc/config/arm/lib1funcs.asm:1145
#2  0x0000b874 in L12 ()
    at ../../llvm-gcc-4.2-2.5/gcc/config/arm/lib1funcs.asm:885
#3  0x00008c54 in main ()
(gdb)

I quit at this point.

On the llvm-devmailing list, Anton Korobeynikov writes today:

> both ppc and arm were broken at the time for 2.5 release.
>
> Hopefully things will be much better with the coming 2.6 release, at
> least one might expect arm and ppc to be more or less ok. ia64 support
> was completely dropped and sparc should be brokens as of time of 2.5.
>
> You might want to stick with next 2.6 release, which is scheduled to
> be out within next 1.5 months
FTBFS bug fix for llvm-gcc-4.2-2.5. While linking cc1-dummy:

libbackend.a(arm.o): In function `current_file_function_operand':
/home/martin/arm/llvm-gcc-4.2-2.5/build-gcc/gcc/../../llvm-gcc-4.2-2.5/gcc/config/arm/arm.c:3506: undefined reference to `ENCODED_SHORT_CALL_ATTR_P'
libbackend.a(arm.o): In function `arm_is_longcall_p':
/home/martin/arm/llvm-gcc-4.2-2.5/build-gcc/gcc/../../llvm-gcc-4.2-2.5/gcc/config/arm/arm.c:3581: undefined reference to `ENCODED_LONG_CALL_ATTR_P'
collect2: ld returned 1 exit status

Definitions fished out of the 2.2 release.

  Martin Guy <martinw...@gmail.com> 4 August 2009

--- a/llvm-gcc-4.2-2.5/gcc/config/arm/arm.h	2009-08-02 22:43:26.000000000 +0100
+++ b/llvm-gcc-4.2-2.5/gcc/config/arm/arm.h	2009-08-04 12:31:24.000000000 +0100
@@ -1867,9 +1867,15 @@
 #define SHORT_CALL_FLAG_CHAR	'^'
 #define LONG_CALL_FLAG_CHAR	'#'
 
+#define ENCODED_SHORT_CALL_ATTR_P(SYMBOL_NAME) \
+  (*(SYMBOL_NAME) == SHORT_CALL_FLAG_CHAR)
+
 #define SYMBOL_SHORT_CALL_ATTR_P(SYMBOL) \
   (SYMBOL_REF_FLAGS (SYMBOL) & SYMBOL_SHORT_CALL)
 
+#define ENCODED_LONG_CALL_ATTR_P(SYMBOL_NAME)  \
+  (*(SYMBOL_NAME) == LONG_CALL_FLAG_CHAR)
+
 #define SYMBOL_LONG_CALL_ATTR_P(SYMBOL) \
   (SYMBOL_REF_FLAGS (SYMBOL) & SYMBOL_LONG_CALL)
 

Reply via email to