Allowing to build for riscv32imac-unknown-none-elf#2703
Draft
SimonIT wants to merge 1 commit intobriansmith:mainfrom
Draft
Allowing to build for riscv32imac-unknown-none-elf#2703SimonIT wants to merge 1 commit intobriansmith:mainfrom
SimonIT wants to merge 1 commit intobriansmith:mainfrom
Conversation
briansmith
requested changes
Sep 25, 2025
| } | ||
|
|
||
| if target.os == NONE { | ||
| let _ = c.flag("-ffreestanding"); |
Owner
There was a problem hiding this comment.
I am not sure this is correct for all "none" targets, e.g. wasm32v1.
I found when targeting some -none targets in the past that I didn't need to build with -ffreestanding. What happens if we omit it for this target?
Author
There was a problem hiding this comment.
cargo:warning=In file included from /mnt/data/Software/Entwicklung/ring/include/ring-core/base.h:26,
cargo:warning= from /mnt/data/Software/Entwicklung/ring/crypto/curve25519/internal.h:18,
cargo:warning= from /mnt/data/Software/Entwicklung/ring/crypto/curve25519/curve25519.c:22:
cargo:warning=/usr/lib/gcc/riscv64-unknown-elf/10.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
cargo:warning= 9 | # include_next <stdint.h>
cargo:warning= | ^~~~~~~~~~
cargo:warning=compilation terminated.
The compiler can't find stdint.h.
I'm also not sure what the best filter for that target is
| let _ = c.flag(f); | ||
| } | ||
|
|
||
| if target.os == NONE { |
Owner
There was a problem hiding this comment.
Please combine this with the if (target.arch == WASM32) || (target.os == "linux" && target.env == "musl" && target.arch != X86_64) below.
If you need to support GCC then you could change the test in that block to also include is_like_gcc or whatever.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I used riscv64-unknown-elf-gcc 10.2.0 for building. With these changes ring builds, but haven't been able to verify if it works, yet.
Please feel free to leave some feedback. Some changes are probably needed in the build.rs, but I'm not sure what they are.
The change in target.h is from #1627