diff --git a/1000-ippcrypto_patch.patch b/1000-ippcrypto_patch.patch new file mode 100644 index 0000000000000000000000000000000000000000..6dfff6893cf3dcbef2f946002354d703bb432d87 --- /dev/null +++ b/1000-ippcrypto_patch.patch @@ -0,0 +1,125 @@ +# Copyright (C) 2022 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ddb61db..302ca95 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,7 @@ endif() + project(${PROJECT_NAME} + VERSION ${PROJECT_VERSION} + LANGUAGES C CXX) ++include(GNUInstallDirs) + + if("${CMAKE_BUILD_TYPE}" STREQUAL "") + message(STATUS "CMAKE_BUILD_TYPE is unset, defaulting to Release") +diff --git a/sources/cmake/linux/GNU8.2.0.cmake b/sources/cmake/linux/GNU8.2.0.cmake +index 9c848d5..30ad189 100644 +--- a/sources/cmake/linux/GNU8.2.0.cmake ++++ b/sources/cmake/linux/GNU8.2.0.cmake +@@ -96,7 +96,7 @@ if(${ARCH} MATCHES "ia32") + endif(${ARCH} MATCHES "ia32") + + # Optimization level = 3, no-debug definition (turns off asserts), warnings=errors +-set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror") ++set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Wno-stringop-overflow -Werror") + + set(w7_opt "${w7_opt} -march=pentium4 -msse2") + set(s8_opt "${s8_opt} -march=core2 -mssse3") +diff --git a/sources/ippcp/CMakeLists.txt b/sources/ippcp/CMakeLists.txt +index dd5ef41..b60357e 100644 +--- a/sources/ippcp/CMakeLists.txt ++++ b/sources/ippcp/CMakeLists.txt +@@ -378,7 +378,7 @@ foreach(opt ${PLATFORM_LIST}) + install(TARGETS ${IPPCP_DYN_ITER} + LIBRARY DESTINATION "lib/${ARCH}/$<$:nonpic>" + RUNTIME DESTINATION "lib/${ARCH}/$<$:nonpic>" +- PUBLIC_HEADER DESTINATION "include") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + list(APPEND IPPCP_LIB_DYNAMIC ${IPPCP_DYN_ITER}) + endif(DYNAMIC_LIB AND NOT MERGED_BLD) + +@@ -407,7 +407,7 @@ foreach(opt ${PLATFORM_LIST}) + set_target_properties(${IPPCP_ST_ITER} PROPERTIES PUBLIC_HEADER "${IPPCP_PUBLIC_HEADERS}") + install(TARGETS ${IPPCP_ST_ITER} + ARCHIVE DESTINATION "lib/${ARCH}/$<$:nonpic>" +- PUBLIC_HEADER DESTINATION "include") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + endif() + + list(APPEND IPPCP_LIB_STATIC ${IPPCP_ST_ITER}) +@@ -482,7 +482,7 @@ if(MERGED_BLD) + + install(TARGETS ${IPPCP_LIB_MERGED} + ARCHIVE DESTINATION "lib/${ARCH}/$<$:nonpic>" +- PUBLIC_HEADER DESTINATION "include" ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + PRIVATE_HEADER DESTINATION "tools/${ARCH}/staticlib") + + set_source_files_properties(${DISPATCHER_C_SOURCES} pcpver.rc PROPERTIES INCLUDE_DIRECTORIES "${C_INCLUDE_DIRECTORIES}") +@@ -521,7 +521,7 @@ if(MERGED_BLD) + install(TARGETS ${IPPCP_LIB_PCS} + LIBRARY DESTINATION "lib/${ARCH}/$<$:nonpic>" + RUNTIME DESTINATION "lib/${ARCH}/$<$:nonpic>" +- PUBLIC_HEADER DESTINATION "include" ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + PRIVATE_HEADER DESTINATION "tools/${ARCH}/staticlib") + + if(WIN32) +diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt +index f75f448..2f43255 100644 +--- a/sources/ippcp/crypto_mb/src/CMakeLists.txt ++++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt +@@ -117,12 +117,12 @@ if (MB_STANDALONE) # standalone crypto_mb's cmake run + install(TARGETS ${MB_DYN_LIB_TARGET} + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "lib" +- PUBLIC_HEADER DESTINATION "include/crypto_mb") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/crypto_mb) + elseif (DYNAMIC_LIB) # build from ippcp's cmake + install(TARGETS ${MB_DYN_LIB_TARGET} + LIBRARY DESTINATION "lib/intel64" + RUNTIME DESTINATION "lib/intel64" +- PUBLIC_HEADER DESTINATION "include/crypto_mb") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/crypto_mb) + endif() + + # Static library +@@ -147,9 +147,9 @@ endif() + if(MB_STANDALONE) + install(TARGETS ${MB_STATIC_LIB_TARGET} + ARCHIVE DESTINATION "lib" +- PUBLIC_HEADER DESTINATION "include/crypto_mb") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/crypto_mb) + else() + install(TARGETS ${MB_STATIC_LIB_TARGET} + ARCHIVE DESTINATION "lib/intel64" +- PUBLIC_HEADER DESTINATION "include/crypto_mb") ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/crypto_mb) + endif() +diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake +index b95f703..1be6ca7 100644 +--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake ++++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake +@@ -46,7 +46,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -fcf-protection=full") + # Enables important warning and error messages relevant to security during compilation + set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wall") + # Warnings=errors +-set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Werror") ++set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wno-stringop-overflow -Werror") + + # Linker flags + +diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/Intel.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/Intel.cmake +index 39862aa..35d49c1 100644 +--- a/sources/ippcp/crypto_mb/src/cmake/linux/Intel.cmake ++++ b/sources/ippcp/crypto_mb/src/cmake/linux/Intel.cmake +@@ -40,7 +40,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -fcf-protection=full") + # Enables important warning and error messages relevant to security during compilation + set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wall") + # Warnings=errors +-set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Werror") ++set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wno-stringop-overflow -Werror") + + # Linker flags + diff --git a/ippcp-2021.6.spec b/ippcp-2021.6.spec new file mode 100644 index 0000000000000000000000000000000000000000..27d03a0a35cbe8c86222b20e0ce101f0e7b546d9 --- /dev/null +++ b/ippcp-2021.6.spec @@ -0,0 +1,77 @@ +%define anolis_release 1 +%define debug_package %{nil} +#Global macro/variable 定义 + +Name: ippcp +Version: 2021.6 +Release: %{anolis_release}%{?dist} +Summary: Intel Integrated Performance Primitives Cryptography +License: Apache License Version 2.0 +URL: https://github.com/intel/ipp-crypto +Source0: https://github.com/intel/ipp-crypto/archive/refs/tags/%{name}-%{version}.tar.gz + +Patch1000: 1000-ippcrypto_patch.patch + +ExclusiveArch: x86_64 + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: nasm +BuildRequires: openssl-devel + +Requires: glibc + +%description +Intel Integrated Performance Primitives Cryptography + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains development files for %{name}. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +%global set_build_flags %{nil} +%cmake -DARCH=intel64 -DCMAKE_BUILD_TYPE=Release -DNONPIC_LIB:BOOL=off -DMERGED_BLD:BOOL=on -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake_build + +%install +%cmake_install + +%files +%{_prefix}/lib/intel64/libippcp.so* +%{_prefix}/lib/intel64/libippcp.a +%{_prefix}/lib/intel64/libcrypto_mb.so* +%{_prefix}/lib/intel64/libcrypto_mb.a + +%files devel +%{_prefix}/lib/intel64/libippcp.so* +%{_prefix}/lib/intel64/libippcp.a +%{_prefix}/lib/intel64/libcrypto_mb.so* +%{_prefix}/lib/intel64/libcrypto_mb.a +%{_prefix}/lib/pkgconfig/*.pc +%{_prefix}/tools/intel64/staticlib/ +%{_prefix}/tools/custom_library_tool_python/ +%{_includedir}/*.h +%{_includedir}/crypto_mb/*.h +%{_prefix}/lib/cmake/ippcp/ + +#%files doc +#%doc README.md AUTHORS ChangeLog NEWS TODO + +%changelog +* Tue Jun 20 2023 xiaojun_huang - 2021.6 +* Init package from upstream diff --git a/ippcp-2021.6.tar.gz b/ippcp-2021.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ca9633d7790951975c3f04111daf58802ceea4a0 Binary files /dev/null and b/ippcp-2021.6.tar.gz differ