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 initial support for hppa-unknown-linux-gnu #3032

Closed
wants to merge 1 commit into from

Conversation

hdeller
Copy link
Contributor

@hdeller hdeller commented Dec 10, 2022

Add libc-files to allow rust to be used on the hppa/parisc platform.

Signed-off-by: Helge Deller deller@gmx.de

Add libc-files to allow rust to be used on the hppa/parisc platform.

Signed-off-by: Helge Deller <deller@gmx.de>
@rustbot
Copy link
Collaborator

rustbot commented Dec 10, 2022

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

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

Is there an opening request to add hppa-unknown-linux-gnu as an official target? I'd like to accept if the target is accepted on rust-lang/rust because official targets have explicit maintainers, e.g. https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/fuchsia.md#target-maintainers, and we can know if a target is still active or not, i.e. when rust-lang/rust drops the support we could follow that. This helps our maintenance work.

@hdeller
Copy link
Contributor Author

hdeller commented Dec 12, 2022

Hi @JohnTitor,
No, I haven't yet opened an request to add hppa-unknown-linux-gnu as an official target, since it's somewhat a chicken-and-egg problem.
Similar to pull request #2414 (which is from @glaubitz for m68k), I helped Adrian @glaubitz to fill in the pieces for hppa (this pull request). Both arches are planned to use the Libgccjit codegen (rust-lang/rust#87260) but to be able to continue on this we need the libc merged first.
It would be really helpful if you could merge this pull request.
Thanks, Helge

@glaubitz
Copy link
Contributor

glaubitz commented Dec 12, 2022 via email

@JohnTitor
Copy link
Member

I mean, you don't have to actually add the target to rust-lang/rust, but I'd like to see that you submit a PR and a reviewer approves that addition.

@glaubitz
Copy link
Contributor

glaubitz commented Dec 14, 2022 via email

@JohnTitor
Copy link
Member

Repeating #3032 (comment), but I'm not talking about technical requirements but maintenance burden. It'd be quite hard to maintain the crate if we accepted all the targets unconditionally (actually, we have received some requests about an unofficial target and decisions were very difficult to make about who to contact, how much use this target is getting, and whether it is safe to delete it, etc.).

@glaubitz
Copy link
Contributor

glaubitz commented Dec 14, 2022 via email

@hdeller
Copy link
Contributor Author

hdeller commented Dec 14, 2022

Yes, I'd be happy to maintain the hppa part.

@JohnTitor
Copy link
Member

It still adds maintenance burden to the libc maintainers to make the list up-to-date. I'm also not sure why forked libc repo doesn't work while they use a custom target, so I'd still prefer following the rustc's target support.

@glaubitz
Copy link
Contributor

It still adds maintenance burden to the libc maintainers to make the list up-to-date. I'm also not sure why forked libc repo doesn't work while they use a custom target, so I'd still prefer following the rustc's target support.

Because Linux distributions don't use forked packages. There is one version of every package.

If individual Rust crates refuse to add support for architectures that are supported by other Rust compilers, I'm not sure what the point of additional Rust compilers with broader architecture support is.

I also don't think there is really a huge burden of maintenance when adding new architectures to the libc crate. It's not that the SysV ABI of a given architecture is a moving target.

@JohnTitor
Copy link
Member

JohnTitor commented Jan 18, 2023

I didn't think of Linux distribution packages, that's fair enough. Could you give me some time to think about adding a new target? I believe we definitely establish a policy for that.

@glaubitz
Copy link
Contributor

We can postpone this until support for hppa has been added through the rustc_codegen_gcc backend since then support for this architecture will also be part of the official Rust compiler.

@workingjubilee
Copy link
Member

There has been an intention to establish a policy for "candidate targets" for some time. These would be essentially a way of defining targets that we (as in rustc) does not have support for, nor even expect to add support for soon, but would consider adding, without actually defining them in-code. It would be a way of essentially, openly discussing, "if we could add this target, roughly what would it look like?" so that other Rust compilers could come to agreement with us, so that software would be portable, and so that future possible targets could inform design decisions. This wouldn't necessarily e.g. handle cross-compiler ABI issues, since repr(Rust) remains unspecified for now.

This policy hasn't been formalized yet, it's still something people are kicking around, but it would likely alleviate the pressure here.

@JohnTitor JohnTitor mentioned this pull request May 8, 2023
@bors
Copy link
Contributor

bors commented Jan 8, 2024

☔ The latest upstream changes (presumably #3525) made this pull request unmergeable. Please resolve the merge conflicts.

@antoyo
Copy link

antoyo commented Jan 12, 2024

What's the status of this?
What is blocking this PR from being merged?

@hdeller hdeller closed this Jan 12, 2024
@hdeller hdeller deleted the hppa-devel3 branch January 12, 2024 19:05
@hdeller
Copy link
Contributor Author

hdeller commented Jan 12, 2024

Oops... I rebased that pull request and updated the branch, but hppa-devel3 (the updated patch) is again available at
https://github.com/hdeller/libc/tree/hppa-devel3
Can this branch be included here in this pull request again?

@hdeller
Copy link
Contributor Author

hdeller commented Jan 12, 2024

Shall I open a new pull request, or what is the best way?

@hdeller
Copy link
Contributor Author

hdeller commented Jan 12, 2024

New pull request is here:
#3539

bors added a commit that referenced this pull request Jan 12, 2024
Add initial support for hppa-unknown-linux-gnu

This is the followup pull-request from:
#3032
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants