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

Update toolchain, get rid of the std-features hack #281

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Conversation

Rahix
Copy link
Owner

@Rahix Rahix commented Jun 16, 2022

The compiler-builtins-mangled-names thingie1 is no longer needed, since compiler_builtins has been improved to avoid pulling the problematic functions:

Suggested-by: @Patryk27
Link: Rahix/avr-hal-template#8

Footnotes

  1. https://github.com/rust-lang/rust/issues/82242

@Rahix
Copy link
Owner Author

Rahix commented Jun 16, 2022

Hm, it seems it's not that simple... CI has found a problem with the new compiler-builtins:

error: linking with `avr-gcc` failed: exit status: 1
  |
  = note: "avr-gcc" "-mmcu=atmega328p" "-Wl,--as-needed" "/home/runner/work/avr-hal/avr-hal/target/avr-atmega328p/debug/deps/uno_infrared-5a3951b8d12057fc.infrared-6fde07c6bec00737.infrared.ef7898aa-cgu.0.rcgu.o.rcgu.o" "-Wl,--as-needed" "-L" "/home/runner/work/avr-hal/avr-hal/target/avr-atmega328p/debug/deps" "-L" "/home/runner/work/avr-hal/avr-hal/target/debug/deps" "-L" "/home/runner/.rustup/toolchains/nightly-2022-05-10-x86_64-unknown-linux-gnu/lib/rustlib/avr-atmega328p/lib" "-Wl,--start-group" "-Wl,--end-group" "-Wl,-Bstatic" "/home/runner/work/avr-hal/avr-hal/target/avr-atmega328p/debug/deps/libcompiler_builtins-2c6cd344c175bc84.rlib" "-Wl,-Bdynamic" "-lgcc" "-Wl,-znoexecstack" "-L" "/home/runner/.rustup/toolchains/nightly-2022-05-10-x86_64-unknown-linux-gnu/lib/rustlib/avr-atmega328p/lib" "-o" "/home/runner/work/avr-hal/avr-hal/target/avr-atmega328p/debug/deps/uno_infrared-5a3951b8d12057fc.elf" "-Wl,--gc-sections"
  = note: /home/runner/work/avr-hal/avr-hal/target/avr-atmega328p/debug/deps/libcompiler_builtins-2c6cd344c175bc84.rlib(compiler_builtins-2c6cd344c175bc84.compiler_builtins.2b21ae12-cgu.2.rcgu.o): In function `compiler_builtins::int::specialized_div_rem::u32_div_rem::habc400843d67f745':
          /home/runner/.rustup/toolchains/nightly-2022-05-10-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:126: undefined reference to `core::panicking::panic::hc86d7a015ce76f79'
          collect2: error: ld returned 1 exit status

I thought the issue with compiler-builtins being compiled with overflow checks had been corrected?

The `compiler-builtins-mangled-names` thingie¹ is no longer needed,
since `compiler_builtins` has been improved to avoid pulling the
problematic functions:

- rust-lang/compiler-builtins#462
- rust-lang/compiler-builtins#466
- rust-lang/rust#97435

¹ rust-lang/rust#82242

Suggested-by: @Patryk27
Link: Rahix/avr-hal-template#8
@Rahix
Copy link
Owner Author

Rahix commented Jun 16, 2022

Ah, CI still used the old nightly release... Sorry for the noise.

@Patryk27
Copy link
Contributor

Ah, CI still used the old nightly release... Sorry for the noise.

Almost thought I'm going crazy 😄

@Rahix Rahix merged commit 4f8ab25 into main Jun 16, 2022
@Rahix Rahix deleted the mangle-no-more branch June 16, 2022 10:19
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.

2 participants