Skip to content

RISC-V ESP-IDF target has different triples for clang and rustc #2396

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
jasta opened this issue Jan 24, 2023 · 1 comment · Fixed by #2397
Closed

RISC-V ESP-IDF target has different triples for clang and rustc #2396

jasta opened this issue Jan 24, 2023 · 1 comment · Fixed by #2397

Comments

@jasta
Copy link
Contributor

jasta commented Jan 24, 2023

Same as #1211 and #2136 but for a slightly different target triple.

The rust to CLang triple mappings should be:

  • xtensa-esp32-espidf => xtensa-esp32-elf
  • xtensa-esp32s2-espidf => xtensa-esp32s2-elf
  • xtensa-esp32s3-espidf => xtensa-esp32s3-elf
  • riscv32imc-esp-espidf => riscv32-esp-elf

Fixing this is part of a larger body of work as defined here: esp-rs/espup#163

jasta added a commit to jasta/rust-bindgen that referenced this issue Jan 24, 2023
This makes it possible to workaround cc/bindgen issues with esp-rs
projects by using only environment varaibles (TARGET_CC, CLANG_PATH,
etc).  Without this, it requires modifying each crate's build.rs that
you try to depend on to add a target option passed along to clang.
jasta added a commit to jasta/rust-bindgen that referenced this issue Jan 24, 2023
Fixes rust-lang#2396.

This makes it possible to workaround cc/bindgen issues with esp-rs
projects by using only environment varaibles (TARGET_CC, CLANG_PATH,
etc).  Without this, it requires modifying each crate's build.rs that
you try to depend on to add a target option passed along to clang.
@jasta jasta changed the title RISC-V ESP-IDF target has different trples for clang and rustc RISC-V ESP-IDF target has different triples for clang and rustc Jan 25, 2023
@jasta
Copy link
Contributor Author

jasta commented Jan 25, 2023

Only riscv32imc-esp-espidf is a Tier 3 platform officially, I'd be happy to support a compromise of dropping the xtensa-* changes, just lmk.

jasta added a commit to jasta/rust-bindgen that referenced this issue Jan 25, 2023
Fixes rust-lang#2396.

This makes it possible to workaround cc/bindgen issues with esp-rs
projects by using only environment varaibles (TARGET_CC, CLANG_PATH,
etc).  Without this, it requires modifying each crate's build.rs that
you try to depend on to add a target option passed along to clang.
pvdrz pushed a commit that referenced this issue Jan 25, 2023
Fixes #2396.

This makes it possible to workaround cc/bindgen issues with esp-rs
projects by using only environment varaibles (TARGET_CC, CLANG_PATH,
etc).  Without this, it requires modifying each crate's build.rs that
you try to depend on to add a target option passed along to clang.
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 a pull request may close this issue.

1 participant