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

riscv32imac-unknown-none-elf support #2403

Open
flippette opened this issue Feb 19, 2025 · 0 comments
Open

riscv32imac-unknown-none-elf support #2403

flippette opened this issue Feb 19, 2025 · 0 comments

Comments

@flippette
Copy link

Hi,

I'm trying to get rustls to work on a bare-metal project using the riscv32imac-unknown-none-elf target.

Here's the relevant section of my Cargo.toml:

[dependencies.getrandom]
version = "0.2"
features = ["custom"]

[dependencies.ring]
git = "https://github.com/briansmith/ring"
rev = "b939c18e27554fdfcbf8d998932dbc4ddd479c54"
features = ["less-safe-getrandom-custom-or-rdrand"]

[dependencies.rustls]
version = "0.23"
default-features = false
features = ["ring"]

I have provided a custom getrandom implementation via register_custom_getrandom!.

I'm getting this build error:

warning: [email protected]: Inherited flag "-fno-omit-frame-pointer" is not supported by the currently used CC
warning: [email protected]: Inherited flag "-fno-omit-frame-pointer" is not supported by the currently used CC
warning: [email protected]: In file included from /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/include/ring-core/base.h:74,
warning: [email protected]:                  from /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/include/ring-core/mem.h:60,
warning: [email protected]:                  from /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/crypto/curve25519/curve25519.c:22:
warning: [email protected]: /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/include/ring-core/target.h:53:2: error: #error "Unknown target CPU"
warning: [email protected]:    53 | #error "Unknown target CPU"
warning: [email protected]:       |  ^~~~~
warning: [email protected]: In file included from /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/crypto/curve25519/internal.h:20,
warning: [email protected]:                  from /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/crypto/curve25519/curve25519.c:24:
warning: [email protected]: /home/flippette/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.9/crypto/curve25519/../internal.h:246:2: error: #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT"
warning: [email protected]:   246 | #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT"

I've tried setting TARGET_CC='riscv32-unknown-elf-gcc' to no avail.

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