From b92e727cf390203134163161cc61deeaf1527e08 Mon Sep 17 00:00:00 2001 From: Jaipaul Cheernam Date: Thu, 24 Sep 2026 17:53:52 +0200 Subject: [PATCH] abseil-cpp: fix 32-bit x86 build of hash.cc The x86 AES SIMD path in absl/hash/internal/hash.cc uses the 64-bit-only _mm_cvtsi128_si64 and _mm_extract_epi64 intrinsics but is gated only on __SSE4_2__ && __AES__, so the 32-bit multilib build fails to compile. Add a patch that requires __x86_64__/_M_X64 for that path, matching the existing guard in absl/crc/internal/crc32_x86_arm_combined_simd.h. Upstream-Bug: https://github.com/abseil/abseil-cpp/issues/2176 Signed-off-by: Jaipaul Cheernam Signed-off-by: Anuj Mittal --- ...-x86-AES-SIMD-path-to-64-bit-targets.patch | 34 +++++++++++++++++++ .../abseil-cpp/abseil-cpp_20260107.1.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-hash-restrict-x86-AES-SIMD-path-to-64-bit-targets.patch diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-hash-restrict-x86-AES-SIMD-path-to-64-bit-targets.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-hash-restrict-x86-AES-SIMD-path-to-64-bit-targets.patch new file mode 100644 index 0000000000..88c1a503c7 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-hash-restrict-x86-AES-SIMD-path-to-64-bit-targets.patch @@ -0,0 +1,34 @@ +From be307ee0aa505709f1fe8fc0563c8326ef2bf7a3 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam +Date: Thu, 24 Sep 2026 14:59:26 +0000 +Subject: [PATCH] Fix 32-bit x86 build of hash.cc + +The x86 AES SIMD path in absl/hash/internal/hash.cc uses the 64-bit-only +_mm_cvtsi128_si64 and _mm_extract_epi64 intrinsics but is gated only on +__SSE4_2__ && __AES__, so 32-bit x86 builds fail to compile. + +Require __x86_64__/_M_X64 for that path, matching the existing guard in +absl/crc/internal/crc32_x86_arm_combined_simd.h. + +Fixes: https://github.com/abseil/abseil-cpp/issues/2176 + +Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/2177] +Upstream-Bug: https://github.com/abseil/abseil-cpp/issues/2176 +--- + absl/hash/internal/hash.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/absl/hash/internal/hash.cc b/absl/hash/internal/hash.cc +index 43cb561b..ef856254 100644 +--- a/absl/hash/internal/hash.cc ++++ b/absl/hash/internal/hash.cc +@@ -28,7 +28,8 @@ + + #ifdef ABSL_AES_INTERNAL_HAVE_X86_SIMD + #error ABSL_AES_INTERNAL_HAVE_X86_SIMD cannot be directly set +-#elif defined(__SSE4_2__) && defined(__AES__) ++#elif defined(__SSE4_2__) && defined(__AES__) && \ ++ (defined(__x86_64__) || defined(_M_X64)) + #define ABSL_AES_INTERNAL_HAVE_X86_SIMD + #endif + diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb index 128ed81556..86f337075c 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" SRC_URI = "https://github.com/abseil/${BPN}/releases/download/${PV}/${BP}.tar.gz \ file://0001-absl-always-use-asm-sgidefs.h.patch \ file://0002-abseil-ppc-fixes.patch \ + file://0003-hash-restrict-x86-AES-SIMD-path-to-64-bit-targets.patch \ " SRC_URI[sha256sum] = "4314e2a7cbac89cac25a2f2322870f343d81579756ceff7f431803c2c9090195"