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

Upgrade the crosstool for the loongarch64-unknown-linux-gnu target #1538

Closed
4 of 11 tasks
heiher opened this issue Aug 8, 2024 · 2 comments · Fixed by #1540
Closed
4 of 11 tasks

Upgrade the crosstool for the loongarch64-unknown-linux-gnu target #1538

heiher opened this issue Aug 8, 2024 · 2 comments · Fixed by #1540

Comments

@heiher
Copy link
Contributor

heiher commented Aug 8, 2024

Checklist

Describe your issue

In this example, the LoongArch compiler generates an R_LARCH_64_PCREL relocation for 1b - .. Unfortunately, older binutils linker does not support R_LARCH_64_PCREL and merely issue a warning instead of failing, leading to incorrect values in the linked executable.

fn main() {
    unsafe {
        core::arch::asm!(
            r#"
            1:
            nop
            .pushsection jump_table,  "awR"
            .balign 8
            .quad 1b - .
            .popsection
            "#
        );
    }
}

What target(s) are you cross-compiling for?

loongarch64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5 (7b79041 2024-07-11)

Example

cross build --target=loongarch64-unknown-linux-gnu

Additional information / notes

No response

heiher added a commit to heiher/rust that referenced this issue Aug 13, 2024
The current cross-compilation toolchain for the LoongArch64 target
consists of GCC 13.2.0, Binutils 2.40, and Glibc 2.36. However, Binutils
2.40 has known issues that in broken binaries without any error reports:

- rust-lang#121289
- cross-rs/cross#1538

This patch upgrades the cross-compilation toolchain for the LoongArch64 target
to resolve these issues.

- GCC: 13.2.0 -> 14.2.0
- Binutils: 2.40 -> 2.42

The new binaries remain compatible with the existing GCC 13.2.0/Glibc 2.36
distribution, and no issues have been identified.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 14, 2024
… r=<try>

Update `crosstool-ng` for loongarch64

The current cross-compilation toolchain for the LoongArch64 target consists of GCC 13.2.0, Binutils 2.40, and Glibc 2.36. However, Binutils 2.40 has known issues that in broken binaries without any error reports:

- rust-lang#121289
- cross-rs/cross#1538

This patch upgrades the cross-compilation toolchain for the LoongArch64 target to resolve these issues.

- GCC: 13.2.0 -> 14.2.0
- Binutils: 2.40 -> 2.42

The new binaries remain compatible with the existing GCC 13.2.0/Glibc 2.36 distribution, and no issues have been identified.

try-job: dist-loongarch64-linux
tgross35 added a commit to tgross35/rust that referenced this issue Aug 19, 2024
…4, r=Mark-Simulacrum

Update `crosstool-ng` for loongarch64

The current cross-compilation toolchain for the LoongArch64 target consists of GCC 13.2.0, Binutils 2.40, and Glibc 2.36. However, Binutils 2.40 has known issues that in broken binaries without any error reports:

- rust-lang#121289
- cross-rs/cross#1538

This patch upgrades the cross-compilation toolchain for the LoongArch64 target to resolve these issues.

- GCC: 13.2.0 -> 14.2.0
- Binutils: 2.40 -> 2.42

The new binaries remain compatible with the existing GCC 13.2.0/Glibc 2.36 distribution, and no issues have been identified.

try-job: dist-loongarch64-linux
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 19, 2024
Rollup merge of rust-lang#129048 - heiher:update-crosstool-loongarch64, r=Mark-Simulacrum

Update `crosstool-ng` for loongarch64

The current cross-compilation toolchain for the LoongArch64 target consists of GCC 13.2.0, Binutils 2.40, and Glibc 2.36. However, Binutils 2.40 has known issues that in broken binaries without any error reports:

- rust-lang#121289
- cross-rs/cross#1538

This patch upgrades the cross-compilation toolchain for the LoongArch64 target to resolve these issues.

- GCC: 13.2.0 -> 14.2.0
- Binutils: 2.40 -> 2.42

The new binaries remain compatible with the existing GCC 13.2.0/Glibc 2.36 distribution, and no issues have been identified.

try-job: dist-loongarch64-linux
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Aug 20, 2024
…-Simulacrum

Update `crosstool-ng` for loongarch64

The current cross-compilation toolchain for the LoongArch64 target consists of GCC 13.2.0, Binutils 2.40, and Glibc 2.36. However, Binutils 2.40 has known issues that in broken binaries without any error reports:

- rust-lang/rust#121289
- cross-rs/cross#1538

This patch upgrades the cross-compilation toolchain for the LoongArch64 target to resolve these issues.

- GCC: 13.2.0 -> 14.2.0
- Binutils: 2.40 -> 2.42

The new binaries remain compatible with the existing GCC 13.2.0/Glibc 2.36 distribution, and no issues have been identified.

try-job: dist-loongarch64-linux
@mcandre
Copy link

mcandre commented Sep 6, 2024

Rust 1.81.0 promotes loongarch (musl) to tier 2.

https://github.com/rust-lang/rust/releases/tag/1.81.0

@heiher
Copy link
Contributor Author

heiher commented Sep 6, 2024

Rust 1.81.0 promotes loongarch (musl) to tier 2.

https://github.com/rust-lang/rust/releases/tag/1.81.0

I'll add support for the loongarch64-unknown-linux-musl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants