From b56b3e485805b5daeb8dcf0d15779380e2ed26fd Mon Sep 17 00:00:00 2001 From: "Vtiurina, Mariia" Date: Tue, 2 Nov 2021 20:11:27 +0300 Subject: [PATCH] intel-crypto-mb: add recipe for ipp crypto library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Intel® Integrated Performance Primitives (Intel® IPP) Cryptography is a secure, fast and lightweight library of building blocks for cryptography, highly-optimized for various Intel® CPUs. Signed-off by: Andrey Latyshev Signed-off-by: Mariia Vtiurina Signed-off-by: Anuj Mittal --- ...ow-to-pass-compiler-and-linker-flags.patch | 29 +++++++++++++++++++ ...ists.txt-exclude-host-system-headers.patch | 24 +++++++++++++++ .../crypto/intel-crypto-mb_2021.3.bb | 29 +++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch create mode 100644 recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch create mode 100644 recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch new file mode 100644 index 00000000..49adf8f1 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch @@ -0,0 +1,29 @@ +From c440800cae91f857949255cc63993426bdaefb26 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Wed, 16 Jun 2021 20:54:33 +0800 +Subject: [PATCH 1/4] GNU.cmake: allow to pass compiler and linker flags + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini +--- + sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake +index 5d148a1..4cb2289 100644 +--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake ++++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake +@@ -56,7 +56,8 @@ set(LINK_FLAGS_DYNAMIC "${LINK_FLAGS_DYNAMIC} ${CRYPTO_MB_SOURCES_DIR}/cmake/dll + # Compiler flags + + # Tells the compiler to align functions and loops +-set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -falign-functions=32 -falign-loops=32") ++ + # Ensures that compilation takes place in a freestanding environment + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding") + +-- +2.17.1 + diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch b/recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch new file mode 100644 index 00000000..f9c4a923 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch @@ -0,0 +1,24 @@ +From 7b575fc23d246373425c3682e83634203aadc4a6 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Thu, 17 Jun 2021 12:35:36 +0800 +Subject: [PATCH 3/4] CMakeLists.txt: exclude host system headers + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini +--- +diff --git a/sources/ippcp/crypto_mb/CMakeLists.txt b/sources/ippcp/crypto_mb/CMakeLists.txt +index d1f3994..db9635b 100644 +--- a/sources/ippcp/crypto_mb/CMakeLists.txt ++++ b/sources/ippcp/crypto_mb/CMakeLists.txt +@@ -75,7 +75,6 @@ endif() + include_directories( + ${MB_INCLUDE_DIRS} + $<$:$ENV{ROOT}/compiler/include $ENV{ROOT}/compiler/include/icc> +- $<$>:${CMAKE_SYSTEM_INCLUDE_PATH}> + $<$,$>:$ENV{INCLUDE}> + ) + +-- +2.17.1 + diff --git a/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb b/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb new file mode 100644 index 00000000..68010a4a --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb @@ -0,0 +1,29 @@ +SUMMARY = "Crypto Multi-buffer Library" +DESCRIPTION = "Intel® Integrated Performance Primitives (Intel® IPP) Cryptography \ +is a secure, fast and lightweight library of building blocks for cryptography, \ +highly-optimized for various Intel® CPUs." +HOMEPAGE = "https://github.com/intel/ipp-crypto" + +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b" + +SRC_URI = " \ + git://github.com/intel/ipp-crypto;protocol=https;branch=ipp-crypto_2021_3 \ + file://0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch;striplevel=4 \ + file://0003-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ + " + +SRCREV = "d9d13aaaf8889753fb58a13c2652c39b67c2076b" + +S = "${WORKDIR}/git/sources/ippcp/crypto_mb" + +DEPENDS = "openssl" + +inherit cmake pkgconfig +COMPATIBLE_HOST = '(x86_64).*-linux' + +# error: 'SHA512_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] +CFLAGS:append = " -Wno-error=deprecated-declarations" + +EXTRA_OECMAKE += " -DARCH=intel64"