From e38bbdeff88834b185f355b356e2426959490f50 Mon Sep 17 00:00:00 2001 From: liujiahui Date: Wed, 28 Oct 2026 16:39:00 +0800 Subject: [PATCH] deps: brotli: cherry-pick e230f474b87 Origin commit message: disable BROTLI_MODEL macro for some targets PiperOrigin-RevId: 827486322 Refs: google/brotli@e230f47 --- deps/brotli/c/common/platform.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deps/brotli/c/common/platform.h b/deps/brotli/c/common/platform.h index b59f9b8091c2..e1254d5ca2d5 100644 --- a/deps/brotli/c/common/platform.h +++ b/deps/brotli/c/common/platform.h @@ -213,6 +213,10 @@ To apply compiler hint, enclose the branching condition into macros, like this: #define BROTLI_TARGET_MIPS64 #endif +#if defined(__ia64__) || defined(_M_IA64) +#define BROTLI_TARGET_IA64 +#endif + #if defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \ defined(BROTLI_TARGET_LOONGARCH64) || defined(BROTLI_TARGET_MIPS64) @@ -665,13 +669,14 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) { #undef BROTLI_TEST #endif -#if BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3) +#if !defined(BROTLI_MODEL) && BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3) && \ + !defined(BROTLI_TARGET_IA64) && !defined(BROTLI_TARGET_LOONGARCH64) #define BROTLI_MODEL(M) __attribute__((model(M))) #else #define BROTLI_MODEL(M) /* M */ #endif -#if BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0) +#if !defined(BROTLI_COLD) && BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0) #define BROTLI_COLD __attribute__((cold)) #else #define BROTLI_COLD /* cold */