Forwarded: https://sourceforge.net/p/sevenzip/patches/369/
Use "__ARM_ARCH" to split "armel" and "armhf".
ARM v7 feature breaks ARM v5 compiler because the feature is not supported
by ARM v5 compiler.
__ARM_ARCH:
armel = 5
armhf = 7
Gbp-Pq: Name 0003-Disable-hardware-acceleration-support-on-armel.patch
#ifdef MY_CPU_X86_OR_AMD64
#define USE_HW_AES
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
+ #if (__ARM_ARCH >= 7)
#if defined(__clang__)
#if (__clang_major__ >= 8) // fix that check
#define USE_HW_AES
#define USE_HW_AES
#endif
#endif
+ #endif
#endif
#ifdef USE_HW_AES
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
+ #if (__ARM_ARCH >= 7)
#if defined(__clang__)
#if (__clang_major__ >= 8) // fix that check
#define USE_HW_AES
#define USE_HW_AES
#endif
#endif
+ #endif
#ifdef USE_HW_AES
#endif
#endif
#elif defined(MY_CPU_ARM_OR_ARM64)
+ #if (__ARM_ARCH >= 7)
#ifdef _MSC_VER
#if _MSC_VER >= 1910
#define Z7_COMPILER_SHA256_SUPPORTED
#define Z7_COMPILER_SHA256_SUPPORTED
#endif
#endif
+ #endif
#endif
void Z7_FASTCALL Sha256_UpdateBlocks(UInt32 state[8], const Byte *data, size_t numBlocks);
#elif defined(MY_CPU_ARM_OR_ARM64)
+ #if (__ARM_ARCH >= 7)
#if defined(__clang__)
#if (__clang_major__ >= 8) // fix that check
#define USE_HW_SHA
#define USE_HW_SHA
#endif
#endif
+ #endif
#ifdef USE_HW_SHA
#ifdef MY_CPU_X86_OR_AMD64
#define USE_HW_AES
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
+ #if (__ARM_ARCH >= 7)
#if defined(__clang__)
#if (__clang_major__ >= 8) // fix that check
#define USE_HW_AES
#define USE_HW_AES
#endif
#endif
+ #endif
#endif
#ifdef USE_HW_AES