SHA256
1
0
forked from pool/gzdoom
gzdoom/gzdoom-lzma-simd.patch
Jan Engelhardt 3c99f6b085 - Add gzdoom-lzma-simd.patch
- Reorder 0001-Revert-Switch-to-miniz-from-zlib.patch before gzdoom-lzma.patch

OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=108
2024-05-01 09:12:22 +00:00

26 lines
1.2 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2024-05-01 00:14:04.625759204 +0200
Subject: Fix build failures involving SIMD code
Fix build failure on Leap 15.6/gcc-7 amd64:
[ 31s] C/SwapBytes.c:312:7: error: incompatible types when initializing type
'__m256i {aka const __vector(4) long long int}' using type 'int'
---
libraries/lzma/C/SwapBytes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: gzdoom-g4.12.2/libraries/lzma/C/SwapBytes.c
===================================================================
--- gzdoom-g4.12.2.orig/libraries/lzma/C/SwapBytes.c
+++ gzdoom-g4.12.2/libraries/lzma/C/SwapBytes.c
@@ -22,7 +22,7 @@ typedef UInt32 CSwapUInt32;
// #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1900)
#if defined(__clang__) && (__clang_major__ >= 4) \
|| defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40701)
- #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_AVX2
+ #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_SSE2
#define SWAP_ATTRIB_SSE2 __attribute__((__target__("sse2")))
#define SWAP_ATTRIB_SSSE3 __attribute__((__target__("ssse3")))
#define SWAP_ATTRIB_AVX2 __attribute__((__target__("avx2")))