Skip to content
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

Add support for vanilla linux on arm. #8220

Closed
wants to merge 1 commit into from

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented Aug 2, 2013

Update the arm linux support some more. We had a previous patch for the RasberryPi. This adds a new target arm-unknown-linux-gnueabi for more general arm linux support.

Build/Host machine: x86_64 Debian testing (jessie) with the gcc-4.4-arm-linux-gnueabi package

Tested on targets:

  • TS-7800 Feroceon (ARMv5TEJ) running Debian 7.0 wheezy
  • Beaglebone black (ARMv7) running Angstrom GNU/Linux v2012.12
    • rustc flags: --target=arm-unknown-linux-gnueabi --linker=arm-linux-gnueabi-gcc
  • Samsung Galaxy S II (to make sure android still works)
    • rustc flags: --target=arm-linux-androideabi --android-cross-path=[path to standalone toolchain]

Since not all arm devices (i.e. afaik anything older than armv6 like the ts-7800 i tested on) supported getting the tls address via the mrc instruction, I made it also try via the magic address the kernel maps into the address space (0xFFFF0FF0). One or the other should work (and on android it seems like both work).

Also fixes a bug where rustc would always try to invoke the android assembler for any kind of arm target.

@@ -1,6 +1,6 @@
[submodule "src/llvm"]
path = src/llvm
url = https://github.com/brson/llvm.git
url = https://github.com/luqmana/llvm.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've almost landed #7115, is there just one commit that I could cherry pick into those changes as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will probably conflict with alexcrichton/llvm@eb05ff3 though I'm fairly sure you can just replace that commit with mine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brson would probably know better...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'm fairly sure. Since that was the patch from #6249 which added some initial support for linux/arm but restricted to just gnueabihf. My patch is more general.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, currently diagnosing another problem in the meantime, after which I'll do some patch shuffling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably ask @yichoi or @sanxiyn about this, though if it still builds with the Android NDK I assume it's ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I tried building for android as well and tested both with the android emulator and a Samsung Galaxy S II.

@graydon
Copy link
Contributor

graydon commented Aug 2, 2013

\o/

bors added a commit that referenced this pull request Aug 5, 2013
Update the arm linux support some more. We had a previous patch for the RasberryPi. This adds a new target `arm-unknown-linux-gnueabi` for more general arm linux support.

Build/Host machine: x86_64 Debian testing (jessie) with the `gcc-4.4-arm-linux-gnueabi` package

Tested on targets:

- TS-7800 Feroceon (ARMv5TEJ) running Debian 7.0 wheezy
- Beaglebone black (ARMv7) running Angstrom GNU/Linux v2012.12
   - rustc flags:  `--target=arm-unknown-linux-gnueabi --linker=arm-linux-gnueabi-gcc`

- Samsung Galaxy S II (to make sure android still works)
   - rustc flags:  `--target=arm-linux-androideabi --android-cross-path=[path to standalone toolchain]`

Since not all arm devices (i.e. afaik anything older than armv6 like the ts-7800 i tested on) supported getting the tls address via the `mrc` instruction, I made it also try via the magic address the kernel maps into the address space (0xFFFF0FF0). One or the other should work (and on android it seems like both work).

Also fixes a bug where rustc would always try to invoke the android assembler for any kind of arm target.
@bors bors closed this Aug 5, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 13, 2022
Consider auto-deref when linting `manual_swap`

fixes rust-lang#8154

changelog: Don't lint `manual_swap` when a field access involves auto-deref
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 this pull request may close these issues.

6 participants