Skip to content

No longer builds on avr targets #910

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

Closed
RalfJung opened this issue May 7, 2025 · 2 comments
Closed

No longer builds on avr targets #910

RalfJung opened this issue May 7, 2025 · 2 comments

Comments

@RalfJung
Copy link
Member

RalfJung commented May 7, 2025

CI over at https://github.com/RalfJung/rustc-build-sysroot is failing with a build error in compiler-builtins:

error[E0432]: unresolved import `core::sync::atomic::AtomicU32`
 --> /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.157/src/math/libm_math/support/feature_detect.rs:3:26
  |
3 | use core::sync::atomic::{AtomicU32, Ordering};
  |                          ^^^^^^^^^
  |                          |
  |                          no `AtomicU32` in `sync::atomic`
  |                          help: a similar name exists in the module: `AtomicU8`

For more information about this error, try `rustc --explain E0432`.
warning: `compiler_builtins` (lib) generated 1 warning (1 duplicate)
error: could not compile `compiler_builtins` (lib) due to 1 previous error; 1 warning emitted

This occurs when building against a target with a custom JSON spec:

{
        "arch": "avr",
        "cpu": "atmega328p",
        "data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
        "env": "",
        "executables": true,
        "linker": "avr-gcc",
        "linker-flavor": "gcc",
        "linker-is-gnu": true,
        "llvm-target": "avr-unknown-unknown",
        "no-compiler-rt": true,
        "os": "none",
        "position-independent-executables": false,
        "exe-suffix": ".elf",
        "eh-frame-header": false,
        "pre-link-args": {
          "gcc": ["-mmcu=atmega328p"]
        },
        "late-link-args": {
          "gcc": ["-lgcc"]
        },
        "target-c-int-width": "16",
        "target-endian": "little",
        "target-pointer-width": "16",
        "vendor": "unknown"
    }

That same spec worked fine before, so seems like probably something in compiler-builtins is just not compatible with this 16bit target any more?

@bjorn3
Copy link
Member

bjorn3 commented May 7, 2025

Already fixed by #909

@RalfJung
Copy link
Member Author

RalfJung commented May 7, 2025

Ah, that just didn't make it into the latest nightly yet.

@RalfJung RalfJung closed this as completed May 7, 2025
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

No branches or pull requests

2 participants