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

When the ruduino compile, that fail by support error for LLVM. #35

Closed
himrock922 opened this issue Jan 17, 2021 · 1 comment
Closed

Comments

@himrock922
Copy link

himrock922 commented Jan 17, 2021

Hi All.

I'm trying compile ruduino on own project.
But, It do fail compile by LLVM support error.

% rustup override set nightly
info: using existing install for 'nightly-x86_64-apple-darwin'
info: override toolchain for '/Users/himrock922/Desktop/Develop/eddie' set to 'nightly-x86_64-apple-darwin'

  nightly-x86_64-apple-darwin unchanged - rustc 1.51.0-nightly (8a6518427 2021-01-16)

% rustup run cargo build -Z build-std=core --target avr-atmega328p.json --release --verbose

   Compiling ruduino v0.2.7
     Running `rustc --crate-name ruduino --edition=2018 /Users/himrock922/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ruduino-0.2.7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="avr-std-stub"' --cfg 'feature="default"' -C metadata=e7ee6d9ba5f8f19c -C extra-filename=-e7ee6d9ba5f8f19c --out-dir /Users/himrock922/Desktop/Develop/eddie/target/avr-atmega328p/release/deps --target /Users/himrock922/Desktop/Develop/eddie/avr-atmega328p.json -L dependency=/Users/himrock922/Desktop/Develop/eddie/target/avr-atmega328p/release/deps -L dependency=/Users/himrock922/Desktop/Develop/eddie/target/release/deps --extern avr_std_stub=/Users/himrock922/Desktop/Develop/eddie/target/avr-atmega328p/release/deps/libavr_std_stub-4c2127b209c7e5fe.rmeta --extern 'noprelude:compiler_builtins=/Users/himrock922/Desktop/Develop/eddie/target/avr-atmega328p/release/deps/libcompiler_builtins-489f13d764afd079.rmeta' --extern 'noprelude:core=/Users/himrock922/Desktop/Develop/eddie/target/avr-atmega328p/release/deps/libcore-3027a7a692d31aa1.rmeta' --extern target_cpu_macro=/Users/himrock922/Desktop/Develop/eddie/target/release/deps/libtarget_cpu_macro-9226fab6ffe884c4.dylib -Z unstable-options --cap-lints allow --cfg avr_mcu_atmega328p`
LLVM ERROR: Not supported instr: <MCInst 258 <MCOperand Reg:1> <MCOperand Imm:15> <MCOperand Reg:45>>
error: could not compile `compiler_builtins`

Where should I confirm with source code or library?

Versions

  • LLVM
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  • rustup
rustup --version 
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.51.0-nightly (8a6518427 2021-01-16)`
  • rustc
rustc --version
rustc 1.51.0-nightly (8a6518427 2021-01-16)
  • cargo
% cargo --version
cargo 1.51.0-nightly (a73e5b7d5 2021-01-12)
  • nightly
% rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/himrock922/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

active toolchain
----------------

nightly-x86_64-apple-darwin (directory override for '/Users/himrock922/Desktop/Develop/eddie')
rustc 1.51.0-nightly (8a6518427 2021-01-16)
  • avr-binutils
% brew info avr-binutils
osx-cross/avr/avr-binutils: stable 2.35.1 (bottled)

% avr-gcc

% brew info avr-gcc
osx-cross/avr/avr-gcc: stable 9.3.0 (bottled)

avr-atmega328p.json

{
  "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": "unknown",
  "position-independent-executables": false,
  "exe-suffix": ".elf",
  "eh-frame-header": false,
  "pre-link-args": {
    "gcc": [
      "-Os",
      "-mmcu=atmega328p"
    ]
  },
  "late-link-args": {
    "gcc": [
      "-lc",
      "-lgcc"
    ]
  },
  "target-c-int-width": "16",
  "target-endian": "little",
  "target-pointer-width": "16",
  "vendor": "unknown"
}

Cargo.toml

[package]
name = "eddie"
version = "0.1.0"
authors = ["himrock922 <*****>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

ruduino = "0.2.7"
@himrock922
Copy link
Author

rust-lang/compiler-builtins#400

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

1 participant