On Tue, Aug 17, 2021 at 9:40 AM Niels Möller nisse@lysator.liu.se wrote:
The configuration where it didn't work was powerpc64-openwrt-linux-musl. I'd like Nettle to work on embedded systems whenever practical. But support depends on assistance from users of those systems.
As I understood it, this system needs to use the v2 ABI. I would hope it's easy to detect the abi used by the configured C compiler, and then select the same prologue sequence as is currently used for little-endian. I.e., one more configure test, and changing the "ifelse(WORDS_BIGENDIAN,no," condition in powerpc64/machine.m4 to check a different configure variable.
I skipped processing the assembly files with a different approach, I made the configuration check for musl and endianness variant to trigger assembly processing. You can check the fix in this branch https://git.lysator.liu.se/mamonet/nettle/-/tree/ppc64_musl_fix Apparently, the bug reporter uses a cross-compiler for powerpc arch. It would be great to run this fix at the same bug environment since I tested the patch in different circumstances.
regards, Mamone