From: Jeremy D. <jer...@us...> - 2023-07-29 20:49:49
|
Recently, a build of pycryptodome failed on MSYS2's CLANGARM64, due to a compile error about __cpuidex not being declared. I know cpuid is an x86 thing, and wouldn't expect it to be present on arm(64). While investigating why this started failing, I found a few things (two of which seem to be issues with mingw-w64). * The prototype for __cpuid in intrin.h is present on ARM64 (and probably ARM32 as well, not tested). This is why the compile test that pycryptodome was doing succeeded (they were only compiling, not linking, or it would have failed at link time) and they went ahead and tried using __cpuidex * pycryptodome's test was checking for __cpuid, but actually ended up using __cpuidex. https://github.com/Legrandin/pycryptodome/pull/757 * There does not appear to be any prototype in intrin.h for __cpuidex like there is for __cpuid, though it is defined in intrin-impl.h. This "oversight" actually allowed the above pull request to sucessfully allow pycryptodome to build for CLANGARM64 (assuming it would have also been erroneously prototyped on ARM as __cpuid was). |