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 <[email protected]>
Signed-off-by: Mariia Vtiurina <[email protected]>

---
 .../intel-crypto-mb/0001-CMake-fixes.patch    | 130 ++++++++++++++++++
 .../crypto/intel-crypto-mb_2021.3.bb          |  32 +++++
 2 files changed, 162 insertions(+)
 create mode 100644 
dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb/0001-CMake-fixes.patch
 create mode 100644 
dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb

diff --git 
a/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb/0001-CMake-fixes.patch
 
b/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb/0001-CMake-fixes.patch
new file mode 100644
index 00000000..4e880275
--- /dev/null
+++ 
b/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb/0001-CMake-fixes.patch
@@ -0,0 +1,130 @@
+From 2d4354f1d965c6fa6372ad6d737f783dc8fe4b67 Mon Sep 17 00:00:00 2001
+From: "Vtiurina, Mariia" <[email protected]>
+Date: Tue, 2 Nov 2021 19:51:59 +0300
+Subject: [PATCH] CMake fixes
+
+Signed-off by: Andrey Latyshev <[email protected]>
+Signed-off by: Mariia Vtiurina <[email protected]>
+
+---
+ sources/cmake/ippcp-gen-config.cmake          |  4 +--
+ sources/ippcp/CMakeLists.txt                  | 27 +++++++++----------
+ sources/ippcp/crypto_mb/CMakeLists.txt        |  1 -
+ .../ippcp/crypto_mb/src/cmake/linux/GNU.cmake |  2 +-
+ 4 files changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/sources/cmake/ippcp-gen-config.cmake 
b/sources/cmake/ippcp-gen-config.cmake
+index d8f3b3b..fd90f25 100644
+--- a/sources/cmake/ippcp-gen-config.cmake
++++ b/sources/cmake/ippcp-gen-config.cmake
+@@ -21,7 +21,7 @@ set(IPPCP_INC_REL_PATH    "include")
+ configure_file("${IPP_CRYPTO_DIR}/sources/cmake/ippcp-config.cmake.in" 
"${CMAKE_BINARY_DIR}/ippcp-config.cmake" @ONLY)
+ 
configure_file("${IPP_CRYPTO_DIR}/sources/cmake/ippcp-config-version.cmake.in" 
"${CMAKE_BINARY_DIR}/ippcp-config-version.cmake" @ONLY)
+ install(FILES
+-    "${CMAKE_BINARY_DIR}/ippcpo-config.cmake"
++    "${CMAKE_BINARY_DIR}/ippcp-config.cmake"
+     "${CMAKE_BINARY_DIR}/ippcp-config-version.cmake"
+-    DESTINATION "cmake")
++    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ippcp)
+ 
+diff --git a/sources/ippcp/CMakeLists.txt b/sources/ippcp/CMakeLists.txt
+index f70439f..5955ecb 100644
+--- a/sources/ippcp/CMakeLists.txt
++++ b/sources/ippcp/CMakeLists.txt
+@@ -232,7 +232,6 @@ set (C_INCLUDE_DIRECTORIES
+     # RSA_SB (ifma) uses crypto_mb headers
+     ${IPP_CRYPTO_SOURCES_DIR}/crypto_mb/include
+     $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include 
$ENV{ROOT}/compiler/include/icc>
+-    $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}>
+     $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}>
+     )
+ 
+@@ -368,9 +367,9 @@ foreach(opt ${PLATFORM_LIST})
+     endif()
+ 
+     install(TARGETS ${IPPCP_DYN_ITER}
+-            LIBRARY DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-            RUNTIME DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-            PUBLIC_HEADER DESTINATION "include")
++            LIBRARY DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++            RUNTIME DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++            PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+     list(APPEND IPPCP_LIB_DYNAMIC ${IPPCP_DYN_ITER})
+   endif(DYNAMIC_LIB AND NOT MERGED_BLD)
+ 
+@@ -398,8 +397,8 @@ foreach(opt ${PLATFORM_LIST})
+   if (NOT MERGED_BLD)
+     set_target_properties(${IPPCP_ST_ITER} PROPERTIES PUBLIC_HEADER 
"${IPPCP_PUBLIC_HEADERS}")
+     install(TARGETS ${IPPCP_ST_ITER}
+-            ARCHIVE DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-            PUBLIC_HEADER DESTINATION "include")
++            ARCHIVE DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++            PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+   endif()
+ 
+   list(APPEND IPPCP_LIB_STATIC ${IPPCP_ST_ITER})
+@@ -473,9 +472,9 @@ if(MERGED_BLD)
+                                                        PRIVATE_HEADER 
"${ONE_CPU_HEADERS}")
+ 
+   install(TARGETS ${IPPCP_LIB_MERGED}
+-          ARCHIVE DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-          PUBLIC_HEADER DESTINATION "include"
+-          PRIVATE_HEADER DESTINATION "tools/${ARCH}/staticlib")
++          ARCHIVE DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++          PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++          PRIVATE_HEADER DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/ippcp/tools/staticlib")
+ 
+   set_source_files_properties(${DISPATCHER_C_SOURCES} pcpver.rc PROPERTIES 
INCLUDE_DIRECTORIES "${C_INCLUDE_DIRECTORIES}")
+   # protection (_FORTIFY_SOURCE) and optimization flags for dispatcher
+@@ -511,10 +510,10 @@ if(MERGED_BLD)
+     set_target_properties(${IPPCP_LIB_PCS} PROPERTIES OUTPUT_NAME 
"${TARGET_NAME}")
+ 
+     install(TARGETS ${IPPCP_LIB_PCS}
+-            LIBRARY DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-            RUNTIME DESTINATION "lib/${ARCH}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
+-            PUBLIC_HEADER DESTINATION "include"
+-            PRIVATE_HEADER DESTINATION "tools/${ARCH}/staticlib")
++            LIBRARY DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++            RUNTIME DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/$<$<BOOL:${NONPIC_LIB}>:nonpic>"
++            PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++            PRIVATE_HEADER DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/ippcp/tools/staticlib")
+ 
+     if(WIN32)
+       set_target_properties(${IPPCP_LIB_PCS} PROPERTIES LINK_FLAGS 
${LINK_FLAG_DYNAMIC_WINDOWS})
+@@ -552,7 +551,7 @@ 
include("${IPP_CRYPTO_DIR}/sources/cmake/ippcp-gen-config.cmake")
+ 
+ # Install Custom Library tool
+ install(DIRECTORY "${TOOLS_DIR}/ipp_custom_library_tool_python/"
+-        DESTINATION "tools/custom_library_tool_python")
++        DESTINATION 
"${CMAKE_INSTALL_LIBDIR}/ippcp/tools/custom_library_tool_python")
+ 
+ # Crypto multi-buffer library
+ if ("${ARCH}" STREQUAL "intel64")
+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}
+      $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include 
$ENV{ROOT}/compiler/include/icc>
+-     $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}>
+      $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}>
+ )
+ 
+diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake 
b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
+index 5d148a1..e86097b 100644
+--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
++++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
+@@ -56,7 +56,7 @@ 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.25.1
+
diff --git 
a/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb
 
b/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb
new file mode 100644
index 00000000..6826ae1f
--- /dev/null
+++ 
b/dynamic-layers/openembedded-layer/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb
@@ -0,0 +1,32 @@
+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-CMake-fixes.patch \
+"
+
+SRCREV = "d9d13aaaf8889753fb58a13c2652c39b67c2076b"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl nasm-native"
+
+PACKAGES =+ "${PN}-tools"
+FILES:${PN}-tools = "${libdir}/ippcp/tools"
+
+inherit cmake
+
+# The flag to not treat warnings as errors for the cases of compiler 
incompatibility
+CFLAGS:append = " -Wno-error=date-time"
+
+# Set the architecture intel64
+EXTRA_OECMAKE += "\
+    -DARCH=${@oe.utils.conditional('TARGET_ARCH','x86_64','intel64','ia32',d)} 
 \
+    "
-- 
2.25.1


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7334): 
https://lists.yoctoproject.org/g/meta-intel/message/7334
Mute This Topic: https://lists.yoctoproject.org/mt/86771972/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to