Allow to build Kepka on other than x86 architectures: armv7, aarch64, ppc64le, etc.

This commit is contained in:
Vitaly Zaitsev 2018-02-20 14:11:34 +01:00 committed by Alex
parent 356f1cb083
commit a4987d41a9
2 changed files with 28 additions and 1 deletions

View File

@ -56,10 +56,37 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#define ARCH_CPU_X86_FAMILY 1
#define ARCH_CPU_X86_64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(_M_IX86) || defined(__i386__)
#define ARCH_CPU_X86_FAMILY 1
#define ARCH_CPU_X86 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__ARMEL__)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__aarch64__)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARM64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__pnacl__)
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__MIPSEL__)
#if defined(__LP64__)
#define ARCH_CPU_MIPS64_FAMILY 1
#define ARCH_CPU_MIPS64EL 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#else
#define ARCH_CPU_MIPS_FAMILY 1
#define ARCH_CPU_MIPSEL 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#endif
#else
#error Please add support for your architecture in base/build_config.h
#endif

View File

@ -251,7 +251,7 @@ static const char *ApiHash = "344583e45741c457fe1862106095a5eb";
#endif
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
#error "Only little endian is supported!"
#warning "Big endian support in Kepka is experimental. Proceed with caution!"
#endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
#ifndef BETA_VERSION_MACRO