Skip to content

Commit

Permalink
ok, the merge really flubbed. clean up and restart.
Browse files Browse the repository at this point in the history
this is a result of manually copying files over from the 0.17.7
tree into the directory, instead of merging it, while keeping our
changes around.

it compiles now under x86 and riscv32, but the rust2c generation code
seems broken due to a missing include path, but let's commit
this here before digging into that.
  • Loading branch information
bunnie committed Feb 10, 2024
1 parent d85160b commit dcdae9f
Show file tree
Hide file tree
Showing 113 changed files with 8,817 additions and 15,037 deletions.
9 changes: 4 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ fn ring_build_rs_main() {
};
let pregenerated = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()).join(PREGENERATED);

// Xous uses a pure Rust transpiled version of the code base
if &target.os == "xous" && &target.arch != "x86_64" {
return;
}
build_c_code(
&target,
pregenerated,
Expand Down Expand Up @@ -418,11 +422,6 @@ fn build_c_code(
ring_core_prefix: &str,
use_pregenerated: bool,
) {
// Xous uses a pure Rust transpiled version of the code base
//if &target.os == "xous" && &target.arch != "x86_64" {
// return;
//}

println!("cargo:rustc-env=RING_CORE_PREFIX={}", ring_core_prefix);

let asm_target = ASM_TARGETS.iter().find(|asm_target| {
Expand Down
48 changes: 24 additions & 24 deletions compile_commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/aes/aes_nohw.c"
"crypto/curve25519/curve25519.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/aes/aes_nohw.c"
"file": "crypto/curve25519/curve25519.c"
},
{
"arguments": [
Expand All @@ -30,10 +30,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/bn/montgomery.c"
"crypto/fipsmodule/aes/aes_nohw.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/bn/montgomery.c"
"file": "crypto/fipsmodule/aes/aes_nohw.c"
},
{
"arguments": [
Expand All @@ -48,10 +48,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/bn/montgomery_inv.c"
"crypto/fipsmodule/bn/montgomery.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/bn/montgomery_inv.c"
"file": "crypto/fipsmodule/bn/montgomery.c"
},
{
"arguments": [
Expand All @@ -66,10 +66,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/limbs/limbs.c"
"crypto/fipsmodule/bn/montgomery_inv.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/limbs/limbs.c"
"file": "crypto/fipsmodule/bn/montgomery_inv.c"
},
{
"arguments": [
Expand All @@ -84,10 +84,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/mem.c"
"crypto/fipsmodule/ec/ecp_nistz.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/mem.c"
"file": "crypto/fipsmodule/ec/ecp_nistz.c"
},
{
"arguments": [
Expand All @@ -102,10 +102,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/poly1305/poly1305.c"
"crypto/fipsmodule/ec/gfp_p256.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/poly1305/poly1305.c"
"file": "crypto/fipsmodule/ec/gfp_p256.c"
},
{
"arguments": [
Expand All @@ -120,10 +120,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/crypto.c"
"crypto/fipsmodule/ec/gfp_p384.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/crypto.c"
"file": "crypto/fipsmodule/ec/gfp_p384.c"
},
{
"arguments": [
Expand All @@ -138,10 +138,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/curve25519/curve25519.c"
"crypto/fipsmodule/ec/p256.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/curve25519/curve25519.c"
"file": "crypto/fipsmodule/ec/p256.c"
},
{
"arguments": [
Expand All @@ -156,10 +156,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/ec/ecp_nistz.c"
"crypto/limbs/limbs.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/ec/ecp_nistz.c"
"file": "crypto/limbs/limbs.c"
},
{
"arguments": [
Expand All @@ -174,10 +174,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/ec/gfp_p256.c"
"crypto/mem.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/ec/gfp_p256.c"
"file": "crypto/mem.c"
},
{
"arguments": [
Expand All @@ -192,10 +192,10 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/ec/gfp_p384.c"
"crypto/poly1305/poly1305.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/ec/gfp_p384.c"
"file": "crypto/poly1305/poly1305.c"
},
{
"arguments": [
Expand All @@ -210,9 +210,9 @@
"-D__xous__",
"-D__riscv",
"-D__riscv_xlen=32",
"crypto/fipsmodule/ec/p256.c"
"crypto/crypto.c"
],
"directory": "/mnt/f/code/ring-xous",
"file": "crypto/fipsmodule/ec/p256.c"
"file": "crypto/crypto.c"
}
]
Empty file modified crypto/chacha/asm/chacha-armv4.pl
100755 → 100644
Empty file.
Empty file modified crypto/chacha/asm/chacha-armv8.pl
100755 → 100644
Empty file.
Empty file modified crypto/chacha/asm/chacha-x86.pl
100755 → 100644
Empty file.
Empty file modified crypto/chacha/asm/chacha-x86_64.pl
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion crypto/curve25519/.gitattributes

This file was deleted.

Loading

0 comments on commit dcdae9f

Please sign in to comment.