From a4987d41a9ba7b08f24518a4208177954eb20880 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Tue, 20 Feb 2018 14:11:34 +0100 Subject: [PATCH] Allow to build Kepka on other than x86 architectures: armv7, aarch64, ppc64le, etc. --- Telegram/SourceFiles/base/build_config.h | 27 ++++++++++++++++++++++++ Telegram/SourceFiles/config.h.in | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/base/build_config.h b/Telegram/SourceFiles/base/build_config.h index 3bf067451..ea584c3e8 100644 --- a/Telegram/SourceFiles/base/build_config.h +++ b/Telegram/SourceFiles/base/build_config.h @@ -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 diff --git a/Telegram/SourceFiles/config.h.in b/Telegram/SourceFiles/config.h.in index 5ab8a6072..783ed1516 100644 --- a/Telegram/SourceFiles/config.h.in +++ b/Telegram/SourceFiles/config.h.in @@ -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