diff options
author | Naveen Saini <naveen.kumar.saini@intel.com> | 2022-03-16 11:07:59 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2022-03-21 21:42:52 +0800 |
commit | f8ce4df0524698a88188ffd7fe1f9e13240b89ab (patch) | |
tree | d3250b37a4eaea0ceb5974b804f78c5951507913 | |
parent | 39027f7038598a72ed3ad2a4865713717629320b (diff) | |
download | meta-intel-f8ce4df0524698a88188ffd7fe1f9e13240b89ab.tar.gz |
intel-crypto-mb: upgrade 2021.3 -> 2021.5
Intel IPP Cryptography uses multiple implementations of each function,
optimized for various CPUs, and the library version targeted
for any CPU contains all of these implementations.
With the dispatcher, the library detects an available CPU in a runtime
and chooses the best for the current hardware version of a function, hence
ignore Yocto march, mtune values and let the project
pass those values along with the right optimization flags.
https://github.com/intel/ipp-crypto/blob/ippcp_2021.5/OVERVIEW.md#dispatcher
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r-- | recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch (renamed from recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch) | 17 | ||||
-rw-r--r-- | recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch | 29 | ||||
-rw-r--r-- | recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch | 45 | ||||
-rw-r--r-- | recipes-oneapi/crypto/intel-crypto-mb_2021.5.bb (renamed from recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb) | 13 |
4 files changed, 60 insertions, 44 deletions
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch index f9c4a923..58ed1c9a 100644 --- a/recipes-oneapi/crypto/intel-crypto-mb/0003-CMakeLists.txt-exclude-host-system-headers.patch +++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch | |||
@@ -1,19 +1,22 @@ | |||
1 | From 7b575fc23d246373425c3682e83634203aadc4a6 Mon Sep 17 00:00:00 2001 | 1 | From efedbf9080c19241c2aa9ee7ba901245d38c8fa2 Mon Sep 17 00:00:00 2001 |
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> |
3 | Date: Thu, 17 Jun 2021 12:35:36 +0800 | 3 | Date: Mon, 7 Mar 2022 16:44:24 +0800 |
4 | Subject: [PATCH 3/4] CMakeLists.txt: exclude host system headers | 4 | Subject: [PATCH 1/2] CMakeLists.txt: exclude host system headers |
5 | 5 | ||
6 | Upstream-Status: Inappropriate | 6 | Upstream-Status: Inappropriate |
7 | 7 | ||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | 8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> |
9 | --- | 9 | --- |
10 | sources/ippcp/crypto_mb/CMakeLists.txt | 1 - | ||
11 | 1 file changed, 1 deletion(-) | ||
12 | |||
10 | diff --git a/sources/ippcp/crypto_mb/CMakeLists.txt b/sources/ippcp/crypto_mb/CMakeLists.txt | 13 | diff --git a/sources/ippcp/crypto_mb/CMakeLists.txt b/sources/ippcp/crypto_mb/CMakeLists.txt |
11 | index d1f3994..db9635b 100644 | 14 | index c4cc82a..4094f34 100644 |
12 | --- a/sources/ippcp/crypto_mb/CMakeLists.txt | 15 | --- a/sources/ippcp/crypto_mb/CMakeLists.txt |
13 | +++ b/sources/ippcp/crypto_mb/CMakeLists.txt | 16 | +++ b/sources/ippcp/crypto_mb/CMakeLists.txt |
14 | @@ -75,7 +75,6 @@ endif() | 17 | @@ -82,7 +82,6 @@ include_directories( |
15 | include_directories( | 18 | ${CRYPTO_MB_INCLUDE_DIR} |
16 | ${MB_INCLUDE_DIRS} | 19 | ${OPENSSL_INCLUDE_DIR} |
17 | $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include $ENV{ROOT}/compiler/include/icc> | 20 | $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include $ENV{ROOT}/compiler/include/icc> |
18 | - $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}> | 21 | - $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}> |
19 | $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}> | 22 | $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}> |
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 deleted file mode 100644 index 49adf8f1..00000000 --- a/recipes-oneapi/crypto/intel-crypto-mb/0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From c440800cae91f857949255cc63993426bdaefb26 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 16 Jun 2021 20:54:33 +0800 | ||
4 | Subject: [PATCH 1/4] GNU.cmake: allow to pass compiler and linker flags | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
9 | --- | ||
10 | sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
14 | index 5d148a1..4cb2289 100644 | ||
15 | --- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
16 | +++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
17 | @@ -56,7 +56,8 @@ set(LINK_FLAGS_DYNAMIC "${LINK_FLAGS_DYNAMIC} ${CRYPTO_MB_SOURCES_DIR}/cmake/dll | ||
18 | # Compiler flags | ||
19 | |||
20 | # Tells the compiler to align functions and loops | ||
21 | -set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32") | ||
22 | +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -falign-functions=32 -falign-loops=32") | ||
23 | + | ||
24 | # Ensures that compilation takes place in a freestanding environment | ||
25 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding") | ||
26 | |||
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch b/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch new file mode 100644 index 00000000..62b56ea2 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From b4549bb765d279b5ba042c6340e1dd69d0890b64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Thu, 10 Mar 2022 14:30:01 +0800 | ||
4 | Subject: [PATCH 2/2] cmake: exclude Yocto build flags | ||
5 | |||
6 | Ipp-crypto has its own set of flags and -march values, | ||
7 | which causes conflict with default -march=nehalem in gcc | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
12 | --- | ||
13 | sources/ippcp/crypto_mb/src/CMakeLists.txt | 2 +- | ||
14 | sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
18 | index 1ca1a8c..5284d62 100644 | ||
19 | --- a/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
20 | +++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
21 | @@ -81,7 +81,7 @@ endif() | ||
22 | set(MB_LIB_TARGET ${MB_DYN_LIB_TARGET}) | ||
23 | |||
24 | set_source_files_properties(${CRYPTO_MB_SOURCES} PROPERTIES COMPILE_DEFINITIONS "${AVX512_LIBRARY_DEFINES}" | ||
25 | - COMPILE_FLAGS "${AVX512_CFLAGS} ${CMAKE_ASM_FLAGS} ${CMAKE_C_FLAGS_SECURITY}") | ||
26 | + COMPILE_FLAGS "${AVX512_CFLAGS} ${CMAKE_C_FLAGS_SECURITY}") | ||
27 | |||
28 | # Don't specify architectural flags for the assembler for this sources, because of the bug in IntelĀ® C Compiler under MacOS: error: invalid instruction mnemonic 'vkmovb' | ||
29 | # The bug has been fixed since version 2021.3. This is a workaround to support older versions of IntelĀ® C Compiler. | ||
30 | diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
31 | index a2abeeb..aadd6e2 100644 | ||
32 | --- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
33 | +++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | ||
34 | @@ -58,7 +58,7 @@ set(LINK_FLAGS_DYNAMIC "${LINK_FLAGS_DYNAMIC} ${CRYPTO_MB_SOURCES_DIR}/cmake/dll | ||
35 | # Compiler flags | ||
36 | |||
37 | # Tells the compiler to align functions and loops | ||
38 | -set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32") | ||
39 | +set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32 ${TOOLCHAIN_OPTIONS}") | ||
40 | # Ensures that compilation takes place in a freestanding environment | ||
41 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding") | ||
42 | |||
43 | -- | ||
44 | 2.17.1 | ||
45 | |||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb b/recipes-oneapi/crypto/intel-crypto-mb_2021.5.bb index 68010a4a..ed1839d3 100644 --- a/recipes-oneapi/crypto/intel-crypto-mb_2021.3.bb +++ b/recipes-oneapi/crypto/intel-crypto-mb_2021.5.bb | |||
@@ -9,12 +9,11 @@ LICENSE = "Apache-2.0" | |||
9 | LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b" | 9 | LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b" |
10 | 10 | ||
11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
12 | git://github.com/intel/ipp-crypto;protocol=https;branch=ipp-crypto_2021_3 \ | 12 | git://github.com/intel/ipp-crypto;protocol=https;branch=ipp-crypto_2021_5 \ |
13 | file://0001-GNU.cmake-allow-to-pass-compiler-and-linker-flags.patch;striplevel=4 \ | 13 | file://0001-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ |
14 | file://0003-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ | 14 | file://0002-cmake-exclude-Yocto-build-flags.patch;striplevel=4 \ |
15 | " | 15 | " |
16 | 16 | SRCREV = "2b8c5c82c87e3fe37f132f632557367d9bc8a69b" | |
17 | SRCREV = "d9d13aaaf8889753fb58a13c2652c39b67c2076b" | ||
18 | 17 | ||
19 | S = "${WORKDIR}/git/sources/ippcp/crypto_mb" | 18 | S = "${WORKDIR}/git/sources/ippcp/crypto_mb" |
20 | 19 | ||
@@ -23,7 +22,5 @@ DEPENDS = "openssl" | |||
23 | inherit cmake pkgconfig | 22 | inherit cmake pkgconfig |
24 | COMPATIBLE_HOST = '(x86_64).*-linux' | 23 | COMPATIBLE_HOST = '(x86_64).*-linux' |
25 | 24 | ||
26 | # error: 'SHA512_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] | ||
27 | CFLAGS:append = " -Wno-error=deprecated-declarations" | ||
28 | |||
29 | EXTRA_OECMAKE += " -DARCH=intel64" | 25 | EXTRA_OECMAKE += " -DARCH=intel64" |
26 | EXTRA_OECMAKE += " -DTOOLCHAIN_OPTIONS='${TOOLCHAIN_OPTIONS}'" | ||