Skip to content

Commit

Permalink
target.h: Only define OPENSSL_<arch> when we have code specific to …
Browse files Browse the repository at this point in the history
…that arch.

New architecture-conditional logic should be done Rust, not in C.
  • Loading branch information
briansmith committed Jan 13, 2024
1 parent accca78 commit 3e50503
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions include/ring-core/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
#define OPENSSL_ARM
#elif defined(__loongarch_lp64)
#define OPENSSL_64_BIT
#define OPENSSL_LOONGARCH64
#elif defined(__riscv) && __SIZEOF_POINTER__ == 8
#define OPENSSL_64_BIT
#define OPENSSL_RISCV64
#elif defined(__wasm__)
#define OPENSSL_32_BIT
// All of following architectures are only supported when `__BYTE_ORDER__` can be used to detect
Expand All @@ -52,17 +50,14 @@
#error "Unsupported endianness"
#elif defined(__MIPSEL__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS
#elif defined(__MIPSEL__) && defined(__LP64__)
#define OPENSSL_64_BIT
#define OPENSSL_MIPS64
#elif defined(__PPC64__) || defined(__powerpc64__)
#define OPENSSL_64_BIT
#elif (defined(__PPC__) || defined(__powerpc__))
#define OPENSSL_32_BIT
#elif defined(__s390x__)
#define OPENSSL_64_BIT
#define OPENSSL_S390X
#else
#error "Unknown target CPU"
#endif
Expand Down

0 comments on commit 3e50503

Please sign in to comment.