Skip to content

Targeting arm-unknown-linux-gnueabihf fails, …-gnueabi works #8536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ion1 opened this issue Aug 15, 2013 · 4 comments
Closed

Targeting arm-unknown-linux-gnueabihf fails, …-gnueabi works #8536

ion1 opened this issue Aug 15, 2013 · 4 comments

Comments

@ion1
Copy link

ion1 commented Aug 15, 2013

I am trying to compile rust (HEAD at 7cda0d4) using --target-triples=x86_64-unknown-linux-gnu,arm-unknown-linux-gnueabihf. The compilation fails with:

compile_and_link: x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/libstd.so
error: linking with `arm-linux-gnueabihf-gcc` failed with code 1
note: arm-linux-gnueabihf-gcc arguments: -L/home/ion/nobackup/src/rust/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib -marm -o x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/libstd-6c65cf4b443341b1-0.8-pre.so x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/std.o -lrustrt -lrt -lpthread -L/home/ion/nobackup/src/rust/rust/.rust -L/home/ion/nobackup/src/rust/rust -shared -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/. -Wl,-rpath,/home/ion/nobackup/src/rust/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib -Wl,-rpath,/usr/local/lib/rustc/arm-unknown-linux-gnueabihf/lib
note: /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: error: x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/libstd-6c65cf4b443341b1-0.8-pre.so uses VFP register arguments, x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/std.o does not
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file x86_64-unknown-linux-gnu/stage2/lib/rustc/arm-unknown-linux-gnueabihf/lib/std.o
collect2: error: ld returned 1 exit status

(Full log)

Compilation succeeds with a non-hf gnueabi target.

@emberian
Copy link
Member

/cc @yichoi @sanxiyn @luqmana

@pnkfelix
Copy link
Member

I have replicated this. (I had not previously tried building gnueabi instead of gnueabihf.)

@yichoi
Copy link
Contributor

yichoi commented Aug 19, 2013

I've tested with ubuntu packages arm-linux-gnueabi-* and arm-linux-gnueabihf-*.
As tilted, gnueabi works and gnueabihf fails.

In case of gnueabihf, readelf results are

File: librustrt.so
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers <------------------ VFP!
  Tag_CPU_unaligned_access: v6

File: std.o
Attribute Section: aeabi
File Attributes
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP

std.o for libstd.so is not armhf binary.
At least, llvm should be triggered to generate armhf code

@luqmana
Copy link
Member

luqmana commented Aug 24, 2013

Yep, seems like LLVM defaults to soft floats on ARM.

@bors bors closed this as completed in bed8489 Aug 25, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 24, 2022
…some, r=camsteffen

Make `search_is_some`s suggestion `MachineApplicable`

My biggest PR to date, about 0.3 Lines have been changed!

Closes rust-lang/rust-clippy#8062

The suggestion seems to work well, as we've received no error reports since the implementation in December. This PR therefore promotes the suggestion to `MachineApplicable`. The tests already include `.fixed` files :)

changelog: [`search_is_some`]: Make more suggestions `MachineApplicable`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants