Bug 19281 - Can't cross-compile glibc-2.22 for ARM
Summary: Can't cross-compile glibc-2.22 for ARM
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-23 12:13 UTC by Roman Bolshakov
Modified: 2015-11-27 09:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
glibc-2.22 cross-compilation failure for ARM (654 bytes, text/plain)
2015-11-23 12:13 UTC, Roman Bolshakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Bolshakov 2015-11-23 12:13:04 UTC
Created attachment 8803 [details]
glibc-2.22 cross-compilation failure for ARM

I'm trying to build a toolchain for Raspberry Pi using crosstool-ng. It goes well up till it starts building glibc-2.22. The host machine is OS X El Capitan.

I've extracted minimal test case of the failure:
➜  csu  cat test.S
.text
.global foo
.arm

foo:
    mov r2, #175
    bic r3, r3, #255
➜  csu  /Volumes/ct-ng/tmp/.build/armv6-rpi-linux-gnueabi/buildtools/bin/armv6-rpi-linux-gnueabi-as test.S
test.S: Assembler messages:
test.S:6: Error: invalid constant (af) after fixup
test.S:7: Error: invalid constant (ff) after fixup
Comment 1 Nick Clifton 2015-11-24 14:46:11 UTC
Hi Roman,

  I could not reproduce this problem using the latest binutils sources.  Please could you check to see if the bug is fixed for you using these sources ?

Cheers
  Nick
Comment 2 Bryan Hundven 2015-11-25 04:37:30 UTC
Nick,

Is this the latest master branch of binutils-gdb, or is the 2.25 branch?

crosstool-NG (currently) only builds released versions (for now). So it would be nice to figure out which exact change resolves this issue and locally in crosstool-NG backport the patch to 2.25.1.

Cheers,

-Bryan
Comment 3 Roman Bolshakov 2015-11-26 14:12:42 UTC
Nick, the latest snapshot doesn't have the issue:
http://mirrors.kernel.org/sourceware/binutils/snapshots/binutils-2.26.51.tar.bz2

As far as I understand this fix resolves it:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=d840c081f8082e8b9e63fead5306643975a97bb3

Is there a released version of binutils which includes the commit?

Thanks,
Roman
Comment 4 Roman Bolshakov 2015-11-26 14:22:31 UTC
Answering my own question:
Git says the fix is included in gdb-7.9+ but there're no official releases of binutils with it:
➜  binutils-gdb git:(master) git tag --contains d840c081f8082e8b9e63fead5306643975a97bb3
gdb-7.10-release
gdb-7.9.0-release
gdb-7.9.1-release
hjl/linux/release/2.25.51.0.1
users/hjl/linux/release/2.25.51.0.2
users/hjl/linux/release/2.25.51.0.3
users/hjl/linux/release/2.25.51.0.4
Comment 5 Nick Clifton 2015-11-27 09:26:03 UTC
Hi Roman,

> Is there a released version of binutils which includes the commit?

No, but there is about to be one.  The 2.26 branch has been created and a release will be forthcoming from it soon...

Cheers
  Nick