Yes, changing the default cpu in its copy of the gcc source fixed the issue.
Here is the extra patch file to add into llvm-gcc-4.2-2.5/debian/patches

I've built and tested this with llvm-gcc-4.2-2.2 but the issue is the
same in 2.5 (and the attached patch file is modified to apply to -2.5)

FWIW, a fixed deb package of llvm-gcc-4.2-2.2 for armel (and a similar
patch for the -2.2 source tree) can be found under
http://simplemachines.it/debian/armel-lenny

    M
Debian armel's minimum CPU is armv4t but standard GCC for EABI sets a default
arch of armv5t, which causes llvm-gcc's libgcc.a to contain illegal "clz"
instructions. This fixes that, the same way as the Debian GCC package.

Adapted from the gcc-4.3 dpatch file
by Martin Guy <martinw...@gmail.com>, 1 August 2009 

--- a/llvm-gcc-4.2-2.5/gcc/config/arm/linux-eabi.h	2007-11-24 12:37:38.000000000 +0000
+++ b/llvm-gcc-4.2-2.5/gcc/config/arm/linux-eabi.h	2007-11-24 12:39:41.000000000 +0000
@@ -45,7 +45,7 @@
    The ARM10TDMI core is the default for armv5t, so set
    SUBTARGET_CPU_DEFAULT to achieve this.  */
 #undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
 
 #undef SUBTARGET_EXTRA_LINK_SPEC
 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"

Reply via email to