-
Notifications
You must be signed in to change notification settings - Fork 5
/
libpng-1.6.37-e2k.patch
51 lines (45 loc) · 1.56 KB
/
libpng-1.6.37-e2k.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From d9ba6ea04880e0fcbc549bc8b24456ea71540c8c Mon Sep 17 00:00:00 2001
From: Ilya Kurdyukov <jpegqs@gmail.com>
Date: Wed, 7 Apr 2021 20:37:27 +0700
Subject: [PATCH] libpng-1.6.37 e2k support
To enable SIMD code use "cmake -DPNG_INTEL_SSE=on"
or "./configure --enable-intel-sse"
---
CMakeLists.txt | 3 ++-
configure | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6451fcf..739ee7a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,7 +122,8 @@ endif()
# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
- CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
+ CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
off: disable the optimizations")
diff --git a/configure b/configure
index 1b2c463..a612e0e 100755
--- a/configure
+++ b/configure
@@ -13533,7 +13533,7 @@ $as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
;;
- i?86|x86_64)
+ i?86|x86_64|e2k)
enable_intel_sse=yes
$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
@@ -13692,7 +13692,7 @@ fi
# fallback if a future host CPU does not match 'x86*')
if test "$enable_intel_sse" != 'no' &&
case "$host_cpu" in
- i?86|x86_64) :;;
+ i?86|x86_64|e2k) :;;
*) test "$enable_intel_sse" != '';;
esac; then
PNG_INTEL_SSE_TRUE=
--
2.17.1