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 ARMv5TE architecture #37615

Merged
merged 2 commits into from Nov 12, 2016

Conversation

Projects
None yet
9 participants
@atilag
Contributor

atilag commented Nov 6, 2016

No description provided.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Nov 6, 2016

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Collaborator

rust-highfive commented Nov 6, 2016

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@japaric

This comment has been minimized.

Show comment
Hide comment
@japaric
Member

japaric commented Nov 6, 2016

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Nov 7, 2016

Member

cc @rust-lang/tools, thoughts on adding a new target?

Member

alexcrichton commented Nov 7, 2016

cc @rust-lang/tools, thoughts on adding a new target?

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Nov 7, 2016

Member

Thanks for the PR @atilag! Could you also expand a bit on your use case for this target and why you'd like to see it in the compiler itself? (as opposed to using custom target specs)

Member

alexcrichton commented Nov 7, 2016

Thanks for the PR @atilag! Could you also expand a bit on your use case for this target and why you'd like to see it in the compiler itself? (as opposed to using custom target specs)

@Amanieu

This comment has been minimized.

Show comment
Hide comment
@Amanieu

Amanieu Nov 7, 2016

Contributor

Another question is, should we also add support for ARMv4T as a target? This is the minimum architecture that Debian armel requires.

Contributor

Amanieu commented Nov 7, 2016

Another question is, should we also add support for ARMv4T as a target? This is the minimum architecture that Debian armel requires.

@atilag

This comment has been minimized.

Show comment
Hide comment
@atilag

atilag Nov 7, 2016

Contributor

Hi guys!
Well, me and me colleagues were trying to build a project around a hardware that, despite of being a little oldish, seems to be still very common in IoT based products. We could use other technologies, like C/C++ of course, but our experience in Rust is being very positive and we would love to keep using it and prove that Rust is a valid option even for these elderly platforms. We don't have special desires to include it as part of the compiler, so maybe using a custom target would work for us, but, is there any strong reason to not include it?
Thanks guys!
Keep up the good work!

Contributor

atilag commented Nov 7, 2016

Hi guys!
Well, me and me colleagues were trying to build a project around a hardware that, despite of being a little oldish, seems to be still very common in IoT based products. We could use other technologies, like C/C++ of course, but our experience in Rust is being very positive and we would love to keep using it and prove that Rust is a valid option even for these elderly platforms. We don't have special desires to include it as part of the compiler, so maybe using a custom target would work for us, but, is there any strong reason to not include it?
Thanks guys!
Keep up the good work!

@japaric

This comment has been minimized.

Show comment
Hide comment
@japaric

japaric Nov 7, 2016

Member

@alexcrichton

Not the OP but if they are building std programs then having the target in-tree + binary releases of std is the most ergonomic option until we get std-aware Cargo. Or, IOW, compiling std for custom targets is a pain in the neck.

@Amanieu

Do you know for how long does Debian intent to provide ARMv4+ support?

Member

japaric commented Nov 7, 2016

@alexcrichton

Not the OP but if they are building std programs then having the target in-tree + binary releases of std is the most ergonomic option until we get std-aware Cargo. Or, IOW, compiling std for custom targets is a pain in the neck.

@Amanieu

Do you know for how long does Debian intent to provide ARMv4+ support?

@fabricedesre

This comment has been minimized.

Show comment
Hide comment
@fabricedesre

fabricedesre Nov 7, 2016

Contributor

Indeed we are building std programs (the OS is Linux), so having an in-tree target helps.

Contributor

fabricedesre commented Nov 7, 2016

Indeed we are building std programs (the OS is Linux), so having an in-tree target helps.

@Amanieu

This comment has been minimized.

Show comment
Hide comment
@Amanieu

Amanieu Nov 7, 2016

Contributor

@japaric I don't think Debian has any intention of dropping armel any time soon. Debian currently supports only two ARM variants: armel (ARMv4t+, soft float) and armhf (ARMv7+, hard float).

Contributor

Amanieu commented Nov 7, 2016

@japaric I don't think Debian has any intention of dropping armel any time soon. Debian currently supports only two ARM variants: armel (ARMv4t+, soft float) and armhf (ARMv7+, hard float).

@atilag

This comment has been minimized.

Show comment
Hide comment
@atilag

atilag Nov 7, 2016

Contributor

@japaric @Amanieu @Amanieu so I have updated the max_atomic_width to 32 bits. I guess that we need to merge rust-lang-nursery/compiler-builtins#115 before merging this one, right?

Contributor

atilag commented Nov 7, 2016

@japaric @Amanieu @Amanieu so I have updated the max_atomic_width to 32 bits. I guess that we need to merge rust-lang-nursery/compiler-builtins#115 before merging this one, right?

@japaric

This comment has been minimized.

Show comment
Hide comment
@japaric

japaric Nov 7, 2016

Member

@atilag #36992 would have to land as well.

Member

japaric commented Nov 7, 2016

@atilag #36992 would have to land as well.

@Amanieu

This comment has been minimized.

Show comment
Hide comment
@Amanieu

Amanieu Nov 7, 2016

Contributor

We also need to decide whether we want to support ARMv4T, ARMv5TE, or both.

Contributor

Amanieu commented Nov 7, 2016

We also need to decide whether we want to support ARMv4T, ARMv5TE, or both.

@atilag

This comment has been minimized.

Show comment
Hide comment
@atilag

atilag Nov 8, 2016

Contributor

@Amanieu I guess that in case we need to support ARMv4T, this could be done in another PR.
My understanding is that supporting ARMv5TE would only increase the added value of the language, so the question would be whether there's any drawback that outperforms this support. If we don't want to deal with a potential instability because of the atomic support, is there any way to mark this support as "unstable" or "experimental" ?

Contributor

atilag commented Nov 8, 2016

@Amanieu I guess that in case we need to support ARMv4T, this could be done in another PR.
My understanding is that supporting ARMv5TE would only increase the added value of the language, so the question would be whether there's any drawback that outperforms this support. If we don't want to deal with a potential instability because of the atomic support, is there any way to mark this support as "unstable" or "experimental" ?

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Nov 8, 2016

Member

Thanks for the explanation @atilag! I think we should hold off on armv4 here and perhaps add that in a future PR (if at all).

If ARMv5 doesn't have atomic instructions, though, then the current stance of the libs team is to set the max_atomic_width field to Some(0) as we can't actually create any instructions there. The fallbacks in compiler-builtins are intended to be optional for other use cases, if needed. We haven't figured out a great story yet, unfortunately, for pulling in those intrinsics on demand.

Member

alexcrichton commented Nov 8, 2016

Thanks for the explanation @atilag! I think we should hold off on armv4 here and perhaps add that in a future PR (if at all).

If ARMv5 doesn't have atomic instructions, though, then the current stance of the libs team is to set the max_atomic_width field to Some(0) as we can't actually create any instructions there. The fallbacks in compiler-builtins are intended to be optional for other use cases, if needed. We haven't figured out a great story yet, unfortunately, for pulling in those intrinsics on demand.

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Nov 10, 2016

Member

@bors: r+

Thanks @atilag! cc @rust-lang/tools, a new target, but not necessarily libstd support just yet

Member

alexcrichton commented Nov 10, 2016

@bors: r+

Thanks @atilag! cc @rust-lang/tools, a new target, but not necessarily libstd support just yet

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 10, 2016

Contributor

📌 Commit 365ea80 has been approved by alexcrichton

Contributor

bors commented Nov 10, 2016

📌 Commit 365ea80 has been approved by alexcrichton

@brson brson added the relnotes label Nov 11, 2016

eddyb added a commit to eddyb/rust that referenced this pull request Nov 11, 2016

@eddyb eddyb referenced this pull request Nov 11, 2016

Closed

Rollup of 29 pull requests #37726

bors added a commit that referenced this pull request Nov 12, 2016

eddyb added a commit to eddyb/rust that referenced this pull request Nov 12, 2016

@eddyb eddyb referenced this pull request Nov 12, 2016

Merged

Rollup of 30 pull requests #37730

bors added a commit that referenced this pull request Nov 12, 2016

@bors bors merged commit 365ea80 into rust-lang:master Nov 12, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

bors added a commit that referenced this pull request Dec 28, 2017

Auto merge of #47018 - malbarbo:armv4t, r=alexcrichton
Add armv4t-unknown-linux-gnueabi target

armv4t was left out of #37615 (armv5te addition) to be included in a [future PR](#37615 (comment)).  So this PR adds armv4t target.

armv4t target is useful because the [armel](https://wiki.debian.org/ArmEabiPort) port of Debian targets armv4t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment