[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0032-M118-fix-zlib-Fix-arm-build.patch
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
5
6 Prevent inclusion of cpuid on arm builds.
7
8 error:
9
10 third_party/zlib/cpu_features.c:15:
11 cpuid.h:14:2: error: this header is for x86 only
12
13 Upstream-Status: Inappropriate
14 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
15 ---
16  third_party/zlib/adler32_simd.c | 2 +-
17  third_party/zlib/cpu_features.c | 2 +-
18  2 files changed, 2 insertions(+), 2 deletions(-)
19
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
24 @@ -49,7 +49,7 @@
25  /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
26  #define NMAX 5552
27  
28 -#if defined(ADLER32_SIMD_SSSE3)
29 +#if (__x86_64__ || __i386__) && defined(ADLER32_SIMD_SSSE3)
30  
31  #include <tmmintrin.h>
32  
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
37 @@ -11,7 +11,7 @@
38  #include <stdint.h>
39  #if defined(_MSC_VER)
40  #include <intrin.h>
41 -#elif defined(ADLER32_SIMD_SSSE3)
42 +#elif (__x86_64__ || __i386__) &&  defined(ADLER32_SIMD_SSSE3)
43  #include <cpuid.h>
44  #endif
45  
46 -- 
47 2.42.1
48