1 From 9ae234968078366877a1f8027423644ae7bbfb89 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Mon, 13 Nov 2023 11:07:15 -0300
4 Subject: [PATCH 32/33] [M118-fix] zlib: Fix arm build
6 Prevent inclusion of cpuid on arm builds.
10 third_party/zlib/cpu_features.c:15:
11 cpuid.h:14:2: error: this header is for x86 only
13 Upstream-Status: Inappropriate
14 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
16 third_party/zlib/adler32_simd.c | 2 +-
17 third_party/zlib/cpu_features.c | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
20 diff --git a/third_party/zlib/adler32_simd.c b/third_party/zlib/adler32_simd.c
21 index 58966eecf0b80..25867ace82bd2 100644
22 --- a/third_party/zlib/adler32_simd.c
23 +++ b/third_party/zlib/adler32_simd.c
25 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
28 -#if defined(ADLER32_SIMD_SSSE3)
29 +#if (__x86_64__ || __i386__) && defined(ADLER32_SIMD_SSSE3)
31 #include <tmmintrin.h>
33 diff --git a/third_party/zlib/cpu_features.c b/third_party/zlib/cpu_features.c
34 index 64e0428cd2fc2..c26c619970c10 100644
35 --- a/third_party/zlib/cpu_features.c
36 +++ b/third_party/zlib/cpu_features.c
41 -#elif defined(ADLER32_SIMD_SSSE3)
42 +#elif (__x86_64__ || __i386__) && defined(ADLER32_SIMD_SSSE3)