Bug 3859

Summary: uClibc 0.9.32 failed to build for THUMB target
Product: uClibc Reporter: Sergei Poselenov <sposelenov>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: uclibc-cvs
Priority: P5    
Version: 0.9.32   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: solves the compilation error in clone.S

Description Sergei Poselenov 2011-06-14 13:55:32 UTC
Hello,

I tried to build the latest version for the Cortex-M3 target and got the
following:
...
  AS libc/sysdeps/linux/arm/bsd-setjmp.o
  AS libc/sysdeps/linux/arm/bsd-_setjmp.o
  AS libc/sysdeps/linux/arm/sigrestorer.o
  AS libc/sysdeps/linux/arm/mmap64.o
  AS libc/sysdeps/linux/arm/vfork.o
libc/sysdeps/linux/arm/mmap64.S: Assembler messages:
libc/sysdeps/linux/arm/mmap64.S:87: Warning: conditional infixes are
deprecated in unified syntax
  AS libc/sysdeps/linux/arm/clone.o
  AS libc/sysdeps/linux/arm/syscall-eabi.o
libc/sysdeps/linux/arm/clone.S: Assembler messages:
libc/sysdeps/linux/arm/clone.S:115: Warning: conditional infixes are
deprecated in unified syntax
libc/sysdeps/linux/arm/clone.S:115: Error: thumb conditional instruction
should be in IT block -- `ldmnefd sp!,{r4}'
make: *** [libc/sysdeps/linux/arm/clone.o] Error 1
make: *** Waiting for unfinished jobs....

0.9.31. builds fine.

uClibc was configured as CONFIG_ARM7TDMI=y and built as follows:
 make ARCH_CFLAGS= 'CPU_CFLAGS=-mthumb -march=armv7 -mfix-cortex-m3-ldrd'

Regards,
Sergei
Comment 1 Vikram 2011-08-05 05:38:18 UTC
Created attachment 3523 [details]
solves the compilation error in clone.S

This patch solved the compilation issue. I compiled it for ARM cortex M3 as well as ARM7TDMI. The compilation succeeds. Please report if you face any issues with this patch,

HTH,
Vikram