Page MenuHomePhabricator

Use preprocessor macros instead of autoconf to detect endianness
ClosedPublic

Authored by deadalnix on Sun, Sep 27, 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.Sun, Sep 27, 23:22
This revision was landed with ongoing or failed builds.Sun, Sep 27, 23:23
This revision was automatically updated to reflect the committed changes.