#3722: Disable GZIP in native compress library (no longer requires PCLMUL)

This commit is contained in:
lax1dude 2024-08-09 19:07:38 +10:00 committed by md_5
parent 6b612302e1
commit cd56fb32c2
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
3 changed files with 4 additions and 7 deletions

View File

@ -8,7 +8,7 @@ echo "Compiling mbedtls"
(cd mbedtls && CFLAGS="-fPIC -I$CWD/src/main/c -DMBEDTLS_USER_CONFIG_FILE='<mbedtls_custom_config.h>'" make no_test)
echo "Compiling zlib"
(cd zlib && CFLAGS=-fPIC ./configure --static && make)
(cd zlib && CFLAGS="-fPIC -DNO_GZIP" ./configure --static && make)
CC="gcc"
CFLAGS="-c -fPIC -O3 -Wall -Werror -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/"

View File

@ -1,4 +1,4 @@
// Header to check for SSE 4.2 support in compression natives
// Header to check for SSE 2, SSSE 3, and SSE 4.2 support in compression natives
// GCC only!
#ifndef _INCLUDE_CPUID_HELPER_H
@ -8,12 +8,9 @@
#include <cpuid.h>
static inline bool checkCompressionNativesSupport() {
unsigned int eax;
unsigned int ebx;
unsigned int ecx;
unsigned int edx;
unsigned int eax, ebx, ecx, edx;
if(__get_cpuid(1, &eax, &ebx, &ecx, &edx)) {
return (ecx & bit_PCLMUL) != 0 && (ecx & bit_SSE4_2) != 0;
return (edx & bit_SSE2) != 0 && (ecx & bit_SSSE3) != 0 && (ecx & bit_SSE4_2) != 0;
}else {
return false;
}