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 LoongArch64 #2023

Closed
wants to merge 6 commits into from
Closed

Add support for LoongArch64 #2023

wants to merge 6 commits into from

Conversation

donmor
Copy link
Contributor

@donmor donmor commented Apr 17, 2023

Yet another architecture :-)
I don' know much about rust, but at least it built on qemu <:-/

@xiangzhai
Copy link

Hi @donmor

Thanks for your contribution for LoongArch!

WARNING: The requested image's platform (linux/loong64) does not match the detected host platform (linux/amd64) and no specific platform was requested
exec /usr/sbin/sh: exec format error

Does it need to cross compile for loongarch64 target on x86_64 host?

Thanks,
Leslie Zhai

@donmor
Copy link
Contributor Author

donmor commented Apr 19, 2023

Hi @donmor

Thanks for your contribution for LoongArch!

WARNING: The requested image's platform (linux/loong64) does not match the detected host platform (linux/amd64) and no specific platform was requested
exec /usr/sbin/sh: exec format error

Does it need to cross compile for loongarch64 target on x86_64 host?

Thanks, Leslie Zhai

I think so but I failed to make it pass CI. I can build this locally on qemu vm, though <:-/

@donmor
Copy link
Contributor Author

donmor commented Apr 19, 2023

And I'm not sure if it is finely optimized. It's just a simpliest patch to build this package on loongarch.

@heiher
Copy link
Contributor

heiher commented May 22, 2023

Could we skip CI and just add basic support like ioctl for now? We can add CI at a later time, such as when promoting to Tier 2.

@chenx97
Copy link
Contributor

chenx97 commented Jul 20, 2024

loongarch64 is already in tier2. This PR should get more attention. @asomers would you like to take a look?

@MingcongBai
Copy link

loongarch64 is already in tier2. This PR should get more attention. @asomers would you like to take a look?

Seconded. The user base of this architecture is definitely picking up and nix is an essential dependency for most Rust applications.

@@ -105,6 +105,9 @@ task:
- name: Linux i686 musl
env:
TARGET: i686-unknown-linux-musl
- name: Linux LoongArch64
Copy link
Member

Choose a reason for hiding this comment

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

Please add this here, Nix has switched to GitHub action for most CI checks:

powerpc64le-unknown-linux-gnu,

Cross.toml Outdated
Comment on lines 6 to 7
[target.loongarch64-unknown-linux-gnu]
image = "ghcr.io/loongarchlinux/archlinux:latest"
Copy link
Member

Choose a reason for hiding this comment

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

Looks like Loongarch has been supported by cross, is this custom image still needed?

@@ -41,6 +41,7 @@ mod consts {
target_arch = "s390x",
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "loongarch64",
Copy link
Member

Choose a reason for hiding this comment

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

Could you guys please check what are currently supported and what are not? And, if there is still a lot of work to do, and you guys don't mind, a tracking issue would be appreciated:)

@SteveLauC
Copy link
Member

The author of this PR hasn't been active on GitHub for a while, so feel free to pick it up.

@xen0n
Copy link

xen0n commented Jul 21, 2024

Triage: #2045 (since nix 0.27.0) already contained the necessary ioctl change, so if this PR is to be rebased, only the CI changes will remain. nix is already working on LoongArch from 0.27.0 on, if one doesn't intend to hack on nix itself.

@SteveLauC
Copy link
Member

Triage: #2045 (since nix 0.27.0) already contained the necessary ioctl change, so if this PR is to be rebased, only the CI changes will remain. nix is already working on LoongArch from 0.27.0 on, if one doesn't intend to hack on nix itself.

Thanks for confirming that!

so if this PR is to be rebased, only the CI changes will remain.

Please also add this target to the target support list of Nix as a tier2 target.

@donmor
Copy link
Contributor Author

donmor commented Jul 21, 2024

Sorry for be inactive (I'm busy at work). I have this rebased here (#2461 ).
I'm not sure if cirrus.yml is still necessary, so I'll leave this open but remove unnecessary changes.

@SteveLauC
Copy link
Member

I'm not sure if cirrus.yml is still necessary, so I'll leave this open but remove unnecessary changes.

This is no longer needed, close it as superseded by #2461.

@SteveLauC SteveLauC closed this Jul 21, 2024
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.

7 participants