From eae77c0115f9465354bf12c56fbbfa6ebabeb78d Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 29 Jul 2026 07:39:14 +0000 Subject: [PATCH 01/13] folly/Portability: define FOLLY_PPC / kIsArchPPC for 32-bit PowerPC Darwin compilers define __ppc64__ (in addition to __powerpc64__) on ppc64 and __ppc__ on 32-bit PowerPC. Accept __ppc64__ for FOLLY_PPC64 and add a FOLLY_PPC macro plus kIsArchPPC for ppc32, for use by subsequent Darwin/PowerPC support changes. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013G8CDpEyDCCgV4jaMM9WME --- folly/Portability.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/folly/Portability.h b/folly/Portability.h index 9390803ea..c7686a0e5 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -115,12 +115,18 @@ constexpr bool kHasUnalignedAccess = false; #define FOLLY_AARCH64 0 #endif -#if defined(__powerpc64__) +#if defined(__powerpc64__) || defined(__ppc64__) #define FOLLY_PPC64 1 #else #define FOLLY_PPC64 0 #endif +#if defined(__ppc__) && !FOLLY_PPC64 +#define FOLLY_PPC 1 +#else +#define FOLLY_PPC 0 +#endif + #if defined(__s390x__) #define FOLLY_S390X 1 #else @@ -156,6 +162,7 @@ constexpr bool kIsArchArm = FOLLY_ARM == 1; constexpr bool kIsArchX86 = FOLLY_X86 == 1; constexpr bool kIsArchAmd64 = FOLLY_X64 == 1; constexpr bool kIsArchAArch64 = FOLLY_AARCH64 == 1; +constexpr bool kIsArchPPC = FOLLY_PPC == 1; constexpr bool kIsArchPPC64 = FOLLY_PPC64 == 1; constexpr bool kIsArchS390X = FOLLY_S390X == 1; constexpr bool kIsArchRISCV64 = FOLLY_RISCV64 == 1; -- 2.43.0