botan icon indicating copy to clipboard operation
botan copied to clipboard

Add missing aes and sha2 ISA target for armv8

Open lieser opened this issue 2 years ago • 2 comments

This fixes the armv8 amalgamation build using the clang compiler from the Android NDK r26.

Fixes #3774.

lieser avatar Oct 27 '23 13:10 lieser

The change causes problem for GCC (./configure.py --compiler-cache=ccache --build-targets=static --without-documentation --extra-cxxflags=-fPIC --cc=gcc --cpu=armv8 --amalgamation --cc-bin=aarch64-linux-gnu-g++):

  • error: pragma or attribute ‘target("aes")’ is not valid
  • error: pragma or attribute ‘target("sha2")’ is not valid

Before I do more work on this, is the fix even going in the right direction?

lieser avatar Oct 27 '23 14:10 lieser

Coverage Status

coverage: 91.692% (+0.006%) from 91.686% when pulling 5d0075312ca313d9646d80d8ca925dcf7dca1a59 on pl/fix-armv8_amalgamation into 60f0343f15cc4f1a90479fa15813788ff405ae4a on master.

coveralls avatar Oct 27 '23 14:10 coveralls

It seems that the comma-notation does not work with gcc. Instead, you'd have to specify BOTAN_FUNC_ISA("+crypto+aes"), for instance. Also, on Android, just specifying +aes seems to be fine. But on GCC it needs both to inline successfully. I'll close this, and continue with #3931 which also adds amalgamation builds for arm64.

reneme avatar Mar 05 '24 16:03 reneme