Skip to content

Commit

Permalink
Merge pull request #64 from mpapierski/63-big-endian
Browse files Browse the repository at this point in the history
Use correct flag on big endian machines.
  • Loading branch information
apoelstra committed Aug 31, 2018
2 parents 2f8855f + 3b86de9 commit 0fe06e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ fn main() {
.define("ENABLE_MODULE_ECDH", Some("1"))
.define("ENABLE_MODULE_RECOVERY", Some("1"));

if let Ok(target_endian) = std::env::var("CARGO_CFG_TARGET_ENDIAN") {
if target_endian == "big" {
base_config.define("WORDS_BIGENDIAN", Some("1"));
}
}

if use_64bit_compilation {
base_config.define("USE_FIELD_5X52", Some("1"))
.define("USE_SCALAR_4X64", Some("1"))
Expand Down

0 comments on commit 0fe06e9

Please sign in to comment.