mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-14 11:13:29 +00:00
openssl-qat: fix openssl-qat build
This commit is contained in:
parent
97a9335e8b
commit
8b348caf85
@ -46,8 +46,8 @@ endef
|
||||
#CONFIGURE_ARGS += --with-openssl_install_dir=$(PKG_INSTALL_DIR)/usr
|
||||
CONFIGURE_ARGS += --prefix=$(PKG_INSTALL_DIR)
|
||||
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_C3XXX) ,--with-qat_dir=$(KERNEL_BUILD_DIR)/quickassist-c3xxx-1.7)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_C2XXX) ,--with-qat_dir=$(KERNEL_BUILD_DIR)/quickassist-c2xxx-1.5)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_C3XXX) ,--with-qat_hw_dir=$(KERNEL_BUILD_DIR)/quickassist-c3xxx-1.7)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_C2XXX) ,--with-qat_hw_dir=$(KERNEL_BUILD_DIR)/quickassist-c2xxx-1.5)
|
||||
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_ENGINE_DISABLE_RSA) ,--disable-qat_rsa)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_QAT_ENGINE_DISABLE_DSA) ,--disable-qat_dsa)
|
||||
|
@ -1,21 +1,33 @@
|
||||
Index: QAT_Engine-0.6.4/configure.ac
|
||||
===================================================================
|
||||
--- QAT_Engine-0.6.4.orig/configure.ac
|
||||
+++ QAT_Engine-0.6.4/configure.ac
|
||||
@@ -554,13 +554,13 @@ case "$host_os" in
|
||||
From 15529dee574c62004a204018de66249335a20cf2 Mon Sep 17 00:00:00 2001
|
||||
From: W_Y_CPP <383152993@qq.com>
|
||||
Date: Sun, 24 Apr 2022 04:37:14 -0400
|
||||
Subject: [PATCH] remove-FORTIFY_SOURCE
|
||||
|
||||
---
|
||||
configure.ac | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d6e43df74..b12492389 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -742,13 +742,13 @@ case "$host_os" in
|
||||
*linux*)
|
||||
if test "`cc --version | head -1 | awk '{print $3>=4.9}' 2>/dev/null`" = "1"
|
||||
then
|
||||
- AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -fno-strict-overflow")
|
||||
+ AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fno-strict-overflow")
|
||||
- AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -fno-strict-overflow"])
|
||||
+ AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -fno-strict-overflow"])
|
||||
else
|
||||
- AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector -fno-strict-overflow")
|
||||
+ AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fno-strict-overflow")
|
||||
- AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector -fno-strict-overflow"])
|
||||
+ AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector -fno-strict-overflow"])
|
||||
fi
|
||||
;;
|
||||
*freebsd*)
|
||||
- AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong")
|
||||
+ AC_ARG_WITH(cflags, AS_HELP_STRING(), , cflags="-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong")
|
||||
- AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong"])
|
||||
+ AC_SUBST([cflags], ["-shared -fPIC -Wall -Wformat -Wformat-security -O2 -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong"])
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 3d9af59ddb472c814fb99ae1fab85030560d2fc6 Mon Sep 17 00:00:00 2001
|
||||
From: W_Y_CPP <383152993@qq.com>
|
||||
Date: Sun, 24 Apr 2022 05:50:46 -0400
|
||||
Subject: [PATCH] remove check icp_sal_versions
|
||||
|
||||
---
|
||||
configure.ac | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d6e43df74..2d981ddcc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -252,9 +252,6 @@ AC_SUBST(enable_qat_auto_engine_init_on_fork)
|
||||
#Default library name is qatengine
|
||||
AC_SUBST([LIBQATNAME], "qatengine")
|
||||
|
||||
-AC_CHECK_FILE(${qat_hw_dir_prefix}/include/qat/icp_sal_versions.h,
|
||||
- [with_icp_sal_versions_h=yes],
|
||||
- [with_icp_sal_versions_h=no])
|
||||
if test "x$with_icp_sal_versions_h" = "xyes" -a "x$enable_qat_sw" = "x"
|
||||
then
|
||||
if test `grep "define SAL_INFO2_DRIVER_SW_VERSION_TYPE \"in-tree\"" ${qat_hw_dir_prefix}/include/qat/icp_sal_versions.h | wc -l` = "1"
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,27 +0,0 @@
|
||||
--- a/.tools/configure.ac
|
||||
+++ b/.tools/configure.ac
|
||||
@@ -415,19 +415,19 @@ then
|
||||
AC_MSG_NOTICE([Enabling writing debug to file])
|
||||
fi
|
||||
|
||||
-
|
||||
-AC_CHECK_PROG(USE_GETCONF, getconf, yes, no)
|
||||
+AC_CHECK_PROG(USE_LDD, ldd, yes, no)
|
||||
+AC_CHECK_PROG(USE_HEAD, head, yes, no)
|
||||
AC_PROG_AWK
|
||||
-if test $AWK == "gawk" -a $USE_GETCONF == "yes"
|
||||
+if test $AWK == "gawk" -a $USE_LDD == "yes" -a $USE_HEAD
|
||||
then
|
||||
AC_MSG_NOTICE([Getting glibc version ...])
|
||||
- if test `getconf GNU_LIBC_VERSION | gawk '{print $2>=2.23?"1":"0"}' 2>/dev/null` == 1
|
||||
+ if test `ldd --version | head -1 | gawk '{print $4>=2.23?"1":"0"}' 2>/dev/null` == 1
|
||||
then
|
||||
AC_MSG_NOTICE([glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported.])
|
||||
else
|
||||
AC_MSG_NOTICE([glibc version is less than 2.23 - no AVX-512 optimisation supported.])
|
||||
fi
|
||||
- if test `getconf GNU_LIBC_VERSION | gawk '{print $2<2.17?"1":"0"}' 2>/dev/null` == 1
|
||||
+ if test `ldd --version | head -1 | gawk '{print $4<2.17?"1":"0"}' 2>/dev/null` == 1
|
||||
then
|
||||
AC_ARG_WITH(LIBS, AS_HELP_STRING(), , LIBS+="-lrt")
|
||||
AC_SUBST(LIBS)
|
@ -1,11 +0,0 @@
|
||||
--- a/.tools/Makefile.am
|
||||
+++ b/.tools/Makefile.am
|
||||
@@ -137,7 +137,7 @@ MAKE = make err-files && make
|
||||
endif
|
||||
|
||||
install-data-am:
|
||||
- -cp -f $(prefix)/lib/libqat.so $(ENGINE_LIB)
|
||||
+ cp -L --remove-destination .libs/libqat.so $(ENGINE_LIB)
|
||||
|
||||
err-files:
|
||||
if QAT_OPENSSL_102
|
@ -1,11 +0,0 @@
|
||||
--- a/.tools/configure.ac
|
||||
+++ b/.tools/configure.ac
|
||||
@@ -533,7 +533,7 @@ then
|
||||
AC_SUBST(QAT_SHARED_LIB_DEPS_DRIVER)
|
||||
fi
|
||||
|
||||
-if test "x$enable_qat_contig_mem" != "xyes" -a "x$enable_multi_thread" != "xyes" -a "$enable_qat16_driver" = "xyes"
|
||||
+if test "x$enable_qat_contig_mem" != "xyes" -a "x$enable_multi_thread" != "xyes"
|
||||
then
|
||||
AC_ARG_WITH(QAT_SHARED_LIB_DEPS_QAE_MEM, AS_HELP_STRING(), , QAT_SHARED_LIB_DEPS_QAE_MEM=["-Wl,-rpath,\$(with_usdm_dir) -L\$(with_usdm_dir) -lusdm_drv_s"])
|
||||
AC_SUBST(QAT_SHARED_LIB_DEPS_QAE_MEM)
|
@ -1,15 +0,0 @@
|
||||
Index: openssl-qat-1/e_qat.c
|
||||
===================================================================
|
||||
--- openssl-qat-1.orig/e_qat.c
|
||||
+++ openssl-qat-1/e_qat.c
|
||||
@@ -1327,8 +1327,10 @@ static int bind_qat(ENGINE *e, const cha
|
||||
* configuration as environment variables.
|
||||
*/
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#if __GLIBC_PREREQ(2, 17)
|
||||
config_section = secure_getenv("QAT_SECTION_NAME");
|
||||
+#endif
|
||||
#else
|
||||
config_section = getenv("QAT_SECTION_NAME");
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user