Skip to content

No longer builds on avr targets #910

Closed
@RalfJung

Description

@RalfJung

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions