Page MenuHomePhabricator

Use preprocessor macros instead of autoconf to detect endianness
ClosedPublic

Authored by deadalnix on Sep 27 2020, 23:18.

Details

Summary

This does not fix any particular issue but it's preferable to not
rely on autoconf. This avoids endianness mess for users on BE hosts
if they use their build without autoconf.

The macros are carefully written to err on the side of the caution,
e.g., we #error if the user manually configures a different endianness
than what we detect.

This is a backport of secp256k1 PR787

Test Plan
ninja check-secp256k1

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Sep 27 2020, 23:22
This revision was landed with ongoing or failed builds.Sep 27 2020, 23:23
This revision was automatically updated to reflect the committed changes.