diff options
Diffstat (limited to 'recipes-oneapi/crypto')
4 files changed, 142 insertions, 0 deletions
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch new file mode 100644 index 00000000..58ed1c9a --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From efedbf9080c19241c2aa9ee7ba901245d38c8fa2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 7 Mar 2022 16:44:24 +0800 | ||
4 | Subject: [PATCH 1/2] CMakeLists.txt: exclude host system headers | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
9 | --- | ||
10 | sources/ippcp/crypto_mb/CMakeLists.txt | 1 - | ||
11 | 1 file changed, 1 deletion(-) | ||
12 | |||
13 | diff --git a/sources/ippcp/crypto_mb/CMakeLists.txt b/sources/ippcp/crypto_mb/CMakeLists.txt | ||
14 | index c4cc82a..4094f34 100644 | ||
15 | --- a/sources/ippcp/crypto_mb/CMakeLists.txt | ||
16 | +++ b/sources/ippcp/crypto_mb/CMakeLists.txt | ||
17 | @@ -82,7 +82,6 @@ include_directories( | ||
18 | ${CRYPTO_MB_INCLUDE_DIR} | ||
19 | ${OPENSSL_INCLUDE_DIR} | ||
20 | $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include $ENV{ROOT}/compiler/include/icc> | ||
21 | - $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}> | ||
22 | $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}> | ||
23 | ) | ||
24 | |||
25 | -- | ||
26 | 2.17.1 | ||
27 | |||
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch new file mode 100644 index 00000000..c47c8de5 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 3b7b4eca54aa8d851e37f60c74e4a027fa7b21f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 14 Jun 2023 13:18:45 +0800 | ||
4 | Subject: [PATCH] crypto-mb: Make sure libs are installed correctly | ||
5 | |||
6 | Dont assume that "lib" is always the correct destination. This fixes | ||
7 | multilib builds when libdir != /usr/lib. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | --- | ||
13 | sources/ippcp/crypto_mb/src/CMakeLists.txt | 6 +++--- | ||
14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
17 | index c9cad06..31f52bd 100644 | ||
18 | --- a/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
19 | +++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt | ||
20 | @@ -123,8 +123,8 @@ endif(DYNAMIC_LIB OR MB_STANDALONE) | ||
21 | # Installation of the shared library | ||
22 | if (MB_STANDALONE) # standalone crypto_mb's cmake run | ||
23 | install(TARGETS ${MB_DYN_LIB_TARGET} | ||
24 | - LIBRARY DESTINATION "lib" | ||
25 | - RUNTIME DESTINATION "lib" | ||
26 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
27 | + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
28 | PUBLIC_HEADER DESTINATION "include/crypto_mb") | ||
29 | elseif (DYNAMIC_LIB) # build from ippcp's cmake | ||
30 | install(TARGETS ${MB_DYN_LIB_TARGET} | ||
31 | @@ -154,7 +154,7 @@ endif() | ||
32 | # Static lib installation | ||
33 | if(MB_STANDALONE) | ||
34 | install(TARGETS ${MB_STATIC_LIB_TARGET} | ||
35 | - ARCHIVE DESTINATION "lib" | ||
36 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
37 | PUBLIC_HEADER DESTINATION "include/crypto_mb") | ||
38 | else() | ||
39 | install(TARGETS ${MB_STATIC_LIB_TARGET} | ||
40 | -- | ||
41 | 2.37.3 | ||
42 | |||
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.11.1.bb b/recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb new file mode 100644 index 00000000..be72fd85 --- /dev/null +++ b/recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Crypto Multi-buffer Library" | ||
2 | DESCRIPTION = "Intel® Integrated Performance Primitives (Intel® IPP) Cryptography \ | ||
3 | is a secure, fast and lightweight library of building blocks for cryptography, \ | ||
4 | highly-optimized for various Intel® CPUs." | ||
5 | HOMEPAGE = "https://github.com/intel/ipp-crypto" | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b" | ||
10 | |||
11 | IPP_BRANCH = "ipp-crypto_${@'_'.join(d.getVar('PV').rsplit('.')[-3:])}" | ||
12 | |||
13 | SRC_URI = "git://github.com/intel/ipp-crypto;protocol=https;branch=${IPP_BRANCH} \ | ||
14 | file://0001-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \ | ||
15 | file://0002-cmake-exclude-Yocto-build-flags.patch;striplevel=4 \ | ||
16 | file://0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch;striplevel=4 \ | ||
17 | " | ||
18 | SRCREV = "d02611e34328898d16025467d3deeb7d62b6076b" | ||
19 | |||
20 | S = "${WORKDIR}/git/sources/ippcp/crypto_mb" | ||
21 | |||
22 | DEPENDS = "openssl" | ||
23 | |||
24 | inherit cmake pkgconfig | ||
25 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
26 | |||
27 | EXTRA_OECMAKE += " -DARCH=intel64" | ||
28 | EXTRA_OECMAKE += " -DTOOLCHAIN_OPTIONS='${TOOLCHAIN_OPTIONS}'" | ||