Xcode 12 problem with detectArmFeatures (cryptopp 8.5)

17 views
Skip to first unread message

Nelson João

unread,
May 11, 2021, 8:15:10 AM5/11/21
to Crypto++ Users
Hi guys,

I have some problems when I try to compile cryptopp inside my app using the cryptopp version 8.5 and XCode 12.
If I try using the older Xcode (11.4), I don't have a problem, but after update the Xcode, I have some undefined methods:
CPU_ProbeARMv7();
CPU_ProbeNEON();
CPU_ProbePMULL();
CPU_ProbeAES();
CPU_ProbeSHA1();
CPU_ProbeSHA256();

Exist some preprocessor to disable these methods?

Regards,
Nelson

Jeffrey Walton

unread,
May 11, 2021, 10:06:31 AM5/11/21
to Crypto++ Users List
On Apple platforms we don't perform CPU probes. A CPU probe is where
we setup a SIGILL handler and try an instruction. If there's a SIGILL
then we know the instruction is not available. On Apple platforms,
memory gets corrupted when a SIGILL is encountered. We are not sure
why. (OpenSSL and Botan stopped doing them, too).

The define you are looking for is CRYPTOPP_NO_CPU_FEATURE_PROBES. It
is usually set automatically in config_cpu.h.
https://github.com/weidai11/cryptopp/blob/master/config_cpu.h#L180.

Jeff
Reply all
Reply to author
Forward
0 new messages