Merge pull request #64 from mpapierski/63-big-endian

Use correct flag on big endian machines.
This commit is contained in:
Andrew Poelstra 2018-08-31 16:07:50 +00:00 committed by GitHub
commit 0fe06e9b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ fn main() {
.define("ENABLE_MODULE_ECDH", Some("1")) .define("ENABLE_MODULE_ECDH", Some("1"))
.define("ENABLE_MODULE_RECOVERY", 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 { if use_64bit_compilation {
base_config.define("USE_FIELD_5X52", Some("1")) base_config.define("USE_FIELD_5X52", Some("1"))
.define("USE_SCALAR_4X64", Some("1")) .define("USE_SCALAR_4X64", Some("1"))