qemu-kvm fails to build from source on armel

Bug #605252 reported by Michael Hope
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Invalid
Undecided
Unassigned
qemu-kvm (Ubuntu)
Fix Released
Low
Loïc Minier

Bug Description

Seen with gcc 4.4_4.4.4-6ubuntu5~ppa2 and qemu-kvm 0.12.4+noroms-0ubuntu4 on armel.

  CC i386-softmmu/testdev.o
  CC i386-softmmu/exec.o
/tmp/ccRTvBx1.s: Assembler messages:
/tmp/ccRTvBx1.s:5918: Error: selected processor does not support Thumb mode `swp r4,r4,[r2]'
/tmp/ccRTvBx1.s:6652: Error: selected processor does not support Thumb mode `swp r6,r6,[ip]'

Related branches

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Successfully reproduce this bug on beagleboard,

  CC i386-linux-user/exec.o
  CC x86_64-linux-user/strace.o
  CC x86_64-linux-user/mmap.o
/tmp/ccusbTQb.s: Assembler messages:
/tmp/ccusbTQb.s:1893: Error: selected processor does not support Thumb mode `swp r4,r4,[r2]'
/tmp/ccusbTQb.s:1968: Error: selected processor does not support Thumb mode `swp r5,r5,[ip]'
make[2]: *** [exec.o] Error 1
make[1]: *** [subdir-i386-linux-user] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC x86_64-linux-user/exec.o
  CC x86_64-linux-user/cpu-exec.o
/tmp/ccolV2ir.s: Assembler messages:
/tmp/ccolV2ir.s:840: Error: selected processor does not support Thumb mode `swp r1,r1,[r4]'
make[2]: *** [cpu-exec.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/ccoCyYPk.s: Assembler messages:
/tmp/ccoCyYPk.s:1950: Error: selected processor does not support Thumb mode `swp r4,r4,[r2]'
/tmp/ccoCyYPk.s:2025: Error: selected processor does not support Thumb mode `swp r5,r5,[ip]'
make[2]: *** [exec.o] Error 1
make[1]: *** [subdir-x86_64-linux-user] Error 2

# gcc --version
gcc (Ubuntu 4.4.4-7ubuntu1~ppa2) 4.4.4 20100712 (Linaro) [release 2010.07-0]

Will create a reduced test case for this bug.

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Reproduce it with gcc in commandline...

x86_64-linux-user# gcc -I/root/build/qemu-kvm-0.12.4+noroms/slirp -Wold-style-definition -Wold-style-declaration -I. -I/root/build/qemu-kvm-0.12.4+noroms -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -I/root/build/qemu-kvm-0.12.4+noroms/fpu -I/root/build/qemu-kvm-0.12.4+noroms/tcg -I/root/build/qemu-kvm-0.12.4+noroms/tcg/arm -I.. -I/root/build/qemu-kvm-0.12.4+noroms/target-i386 -DNEED_CPU_H -I/root/build/qemu-kvm-0.12.4+noroms/linux-user -I/root/build/qemu-kvm-0.12.4+noroms/linux-user/x86_64 -MMD -MP -MT exec.o -O2 -g -g -O2 -Wall -g -O2 -c -o exec.o /root/build/qemu-kvm-0.12.4+noroms/exec.c
/tmp/ccVhJe7F.s: Assembler messages:
/tmp/ccVhJe7F.s:1950: Error: selected processor does not support Thumb mode `swp r4,r4,[r2]'
/tmp/ccVhJe7F.s:2025: Error: selected processor does not support Thumb mode `swp r5,r5,[ip]'

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

 139:/root/build/qemu-kvm-0.12.4+noroms/qemu-lock.h **** static inline int testandset (int *spinlock)
 140:/root/build/qemu-kvm-0.12.4+noroms/qemu-lock.h **** {
 141:/root/build/qemu-kvm-0.12.4+noroms/qemu-lock.h **** register unsigned int ret;
 142:/root/build/qemu-kvm-0.12.4+noroms/qemu-lock.h **** __asm__ __volatile__("swp %0, %1, [%2]"
 1944 .loc 3 142 0
 1945 ???? 40F20005 movw r5, #:lower16:.LANCHOR1
 1946 ???? C0F20005 movt r5, #:upper16:.LANCHOR1
 1947 ???? A5F10002 sub r2, r5, #224
 1948 #APP
 1949 @ 142 "/root/build/qemu-kvm-0.12.4+noroms/qemu-lock.h" 1
 1950 swp r4, r4, [r2]

In qemu-lock.h:
    138 #elif defined(__arm__)
    139 static inline int testandset (int *spinlock)
    140 {
    141 register unsigned int ret;
    142 __asm__ __volatile__("swp %0, %1, [%2]"
    143 : "=r"(ret)
    144 : "0"(1), "r"(spinlock));
    145
    146 return ret;
    147 }

Revision history for this message
Loïc Minier (lool) wrote :

I think it's due to the removal of an earlier patch I had

Revision history for this message
Loïc Minier (lool) wrote :

qemu-kvm (0.12.4+noroms-0ubuntu5) maverick; urgency=low

  * Re-add patch Detect-and-use-GCC-atomic-builtins-for-locking from
    0.12.2-0ubuntu6arm1 (0.12.2-0ubuntu7) since it was not merged upstream and
    is sitll needed to build qemu-kvm in thumb mode on armel; LP: #605252.

 -- Loic Minier <email address hidden> Fri, 16 Jul 2010 23:06:00 +0200

Changed in gcc-linaro:
status: New → Invalid
Changed in qemu-kvm (Ubuntu):
importance: Undecided → Low
assignee: nobody → Loïc Minier (lool)
status: New → Fix Released
summary: - qemu-kvm fails to build from source with Linaro toolchain
+ qemu-kvm fails to build from source on armel
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.