[cross] cross-gcc-4.4 fails to build eglibc for armv5te

Bug #605030 reported by Peter Pearse on 2010-07-13
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Toolchain Miscellanies
Fix Released
Undecided
Unassigned
eglibc (Ubuntu)
Undecided
Steve Langasek

Bug Description

Using arm-linux-gnueabi-gcc (Ubuntu 4.4.4-6ubuntu5~ppa2hrw3) 4.4.4 downloaded from http://people.canonical.com/~hrw/ubuntu-maverick-armel-cross-compilers on eglibc_2.12-0ubuntu4 source code with debian/rules HOST_CFLAGS
patched for an arv5 build -march=armv5te -marm the build fails with

../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Assembler messages:
../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:32: Error: cannot honor width suffix -- `str lr,[sp,#-4]!'
../ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S:32: Error: cannot honor width suffix -- `ldr lr,[sp],#4'
make[3]: *** [/home/chroot-user/build/eglibc/build-tree/armel-libc/csu/libc-do-syscall.op] Error 1
make[3]: Leaving directory `/home/chroot-user/build/eglibc/csu'
make[2]: *** [csu/subdir_lib] Error 2
make[2]: Leaving directory `/home/chroot-user/build/eglibc'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/chroot-user/build/eglibc/build-tree/armel-libc'
make: *** [/home/chroot-user/build/eglibc/stamp-dir/build_libc] Error 2

This failure has also been observed with armv6 & gcc-4.5arm-linux-gnueabi.n the CodeSourcery arm-2010q1 source release which builds successfully for armv5te during the compiler build.

Build log & pre-processed file attached.

The file concerned matches that i

Peter Pearse (peter-pearse) wrote :
Peter Pearse (peter-pearse) wrote :
Peter Pearse (peter-pearse) wrote :

Previous comment should read:

This failure has also been observed with armv6 & gcc-4.5arm-linux-gnueabi

The file concerned (libc-do-syscall.S) matches that in the CodeSourcery arm-2010q1 source release which builds successfully for armv5te during the compiler build.

Peter Pearse (peter-pearse) wrote :

Appears to be due to trying to assemble thumb1 as thumb2.

Changed in gcc-linaro:
assignee: nobody → Paul Brook (paul-codesourcery)
Paul Brook (paul-codesourcery) wrote :

Not a toolchain bug.

The problem is that ENTRY() implies CALL_MCOUNT. The CALL_MCOUNT implementation assumes ARM or Thumb-2 mode. The obvious fix is to add #ifdef __thumb2__ rount the .thumb directive. However this is not sufficient.
__libc_do_syscall relies on passing an argument in IP. The mcount call will clobber IP.

The best fix is probably to avoid the mcount call altogether for this function. This is a magic internal helper routine, so having it show up on a profile is already somewhat suspect.

Changed in gcc-linaro:
assignee: Paul Brook (paul-codesourcery) → nobody
Steve Langasek (vorlon) wrote :

not a gcc issue, per Paul.

Changed in gcc-linaro:
status: New → Invalid
Matthias Klose (doko) on 2010-08-24
tags: added: armel toolchain
Loïc Minier (lool) on 2010-08-26
affects: gcc-linaro → linaro-toolchain-misc
Changed in linaro-toolchain-misc:
status: Invalid → New
Steve Langasek (vorlon) on 2010-08-27
Changed in eglibc (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
Steve Langasek (vorlon) on 2010-09-08
Changed in eglibc (Ubuntu):
status: New → Fix Committed
Colin Watson (cjwatson) wrote :

eglibc (2.12.1-0ubuntu5) maverick; urgency=low

  [ Steve Langasek ]
  * debian/patches/arm/local-syscall-mcount.diff: unset CALL_MCOUNT for
    __libc_do_syscall. Thanks to Peter Pearse
    <email address hidden>. Closes LP: #605030.

  [ Matthias Klose ]
  * Fix _FORITY_SOURCE version of longjmp for Linux/x86-64 (Chung-Lin Tang)
    LP: #601030.

 -- Matthias Klose <email address hidden> Fri, 10 Sep 2010 18:19:01 +0200

Changed in eglibc (Ubuntu):
status: Fix Committed → Fix Released
Changed in linaro-toolchain-misc:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers