|
| 1 | +diff --git a/sources/cmake/linux/GNU8.2.0.cmake b/sources/cmake/linux/GNU8.2.0.cmake |
| 2 | +index 24d7e0f..15dd433 100644 |
| 3 | +--- a/sources/cmake/linux/GNU8.2.0.cmake |
| 4 | ++++ b/sources/cmake/linux/GNU8.2.0.cmake |
| 5 | +@@ -32,7 +32,7 @@ set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_SECURITY} -nostdlib") |
| 6 | + # Dynamically link lib c (libdl is for old apps) |
| 7 | + set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_DYNAMIC_LINUX} -Wl,-call_shared,-lc") |
| 8 | + # Create a shared library |
| 9 | +-set(LINK_FLAG_DYNAMIC_LINUX "-Wl,-shared") |
| 10 | ++set(LINK_FLAG_DYNAMIC_LINUX "-Wl,-shared,-fuse-ld=bfd") |
| 11 | + if(${ARCH} MATCHES "ia32") |
| 12 | + # Tells the compiler to generate code for a specific architecture (32) |
| 13 | + set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_DYNAMIC_LINUX} -m32") |
| 14 | +@@ -74,7 +74,7 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB)) |
| 15 | + endif() |
| 16 | + |
| 17 | + # Security flag that adds compile-time and run-time checks |
| 18 | +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2") |
| 19 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") |
| 20 | + |
| 21 | + if(NOT NONPIC_LIB) |
| 22 | + # Position Independent Execution (PIE) |
| 23 | +@@ -95,6 +95,8 @@ if(${ARCH} MATCHES "ia32") |
| 24 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") |
| 25 | + endif(${ARCH} MATCHES "ia32") |
| 26 | + |
| 27 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wno-strict-aliasing -Wno-parentheses -Wno-array-parameter") |
| 28 | ++ |
| 29 | + # Optimization level = 3, no-debug definition (turns off asserts), warnings=errors |
| 30 | + set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror") |
| 31 | + |
| 32 | +diff --git a/sources/cmake/macosx/AppleClang11.0.0.cmake b/sources/cmake/macosx/AppleClang11.0.0.cmake |
| 33 | +index 5b92877..ccb963e 100644 |
| 34 | +--- a/sources/cmake/macosx/AppleClang11.0.0.cmake |
| 35 | ++++ b/sources/cmake/macosx/AppleClang11.0.0.cmake |
| 36 | +@@ -20,12 +20,6 @@ |
| 37 | + |
| 38 | + # Security Linker flags |
| 39 | + set(LINK_FLAG_SECURITY "") |
| 40 | +-# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed |
| 41 | +-set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs") |
| 42 | +-# Stack execution protection |
| 43 | +-set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,noexecstack") |
| 44 | +-# Data relocation and protection (RELRO) |
| 45 | +-set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,relro -Wl,-z,now") |
| 46 | + # Prevents the compiler from using standard libraries and startup files when linking. |
| 47 | + set(LINK_FLAG_DYNAMIC_MACOSX "${LINK_FLAG_SECURITY} -nostdlib") |
| 48 | + # Dynamically link lib c (libdl is for old apps) |
| 49 | +@@ -79,7 +73,7 @@ if ((${ARCH} MATCHES "ia32") OR (NOT NONPIC_LIB)) |
| 50 | + endif() |
| 51 | + |
| 52 | + # Security flag that adds compile-time and run-time checks |
| 53 | +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2") |
| 54 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") |
| 55 | + |
| 56 | + if(NOT NONPIC_LIB) |
| 57 | + # Position Independent Execution (PIE) |
| 58 | +@@ -98,6 +92,8 @@ if(${ARCH} MATCHES "ia32") |
| 59 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") |
| 60 | + endif(${ARCH} MATCHES "ia32") |
| 61 | + |
| 62 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-variable -Wno-unknown-pragmas -Wno-missing-braces -Wno-unused-command-line-argument -Wno-unused-but-set-variable -Wno-unknown-warning-option") |
| 63 | ++ |
| 64 | + # Optimization level = 3, no-debug definition (turns off asserts), warnings=errors |
| 65 | + set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror") |
| 66 | + |
| 67 | +@@ -115,3 +111,5 @@ set(l9_opt "${l9_opt} -march=haswell -mavx2 -maes -mpclmul -msha -mrdrnd -mrdsee |
| 68 | + set(n0_opt "${n0_opt} -march=knl -mavx2 -maes -mavx512f -mavx512cd -mavx512pf -mavx512er -mpclmul -msha -mrdrnd -mrdseed") |
| 69 | + set(k0_opt "${k0_opt} -march=skylake-avx512") |
| 70 | + set(k0_opt "${k0_opt} -maes -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mpclmul -msha -mrdrnd -mrdseed -madx -mgfni -mvaes -mvpclmulqdq -mavx512vbmi -mavx512vbmi2") |
| 71 | ++set(k1_opt "${k1_opt} -march=skylake-avx512") |
| 72 | ++set(k1_opt "${k1_opt} -maes -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mpclmul -msha -mrdrnd -mrdseed -madx -mgfni -mvaes -mvpclmulqdq -mavx512vbmi -mavx512vbmi2") |
| 73 | +diff --git a/sources/cmake/macosx/common.cmake b/sources/cmake/macosx/common.cmake |
| 74 | +index 85ec3ad..67bb9f9 100644 |
| 75 | +--- a/sources/cmake/macosx/common.cmake |
| 76 | ++++ b/sources/cmake/macosx/common.cmake |
| 77 | +@@ -18,7 +18,7 @@ |
| 78 | + # Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography) |
| 79 | + # |
| 80 | + |
| 81 | +-set(OS_DEFAULT_COMPILER Intel19.0.0) |
| 82 | ++set(OS_DEFAULT_COMPILER AppleClang11.0.0) |
| 83 | + |
| 84 | + set(LIBRARY_DEFINES "${LIBRARY_DEFINES} -DIPP_PIC -DOSXEM64T -DLINUX32E -D_ARCH_EM64T") |
| 85 | + #set(LIBRARY_DEFINES "${LIBRARY_DEFINES} -DBN_OPENSSL_DISABLE") |
| 86 | +\ No newline at end of file |
| 87 | +diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake |
| 88 | +index a2abeeb..67aca8b 100644 |
| 89 | +--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake |
| 90 | ++++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake |
| 91 | +@@ -31,7 +31,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wformat -Wformat-security |
| 92 | + if(${CMAKE_BUILD_TYPE} STREQUAL "Release") |
| 93 | + if(NOT DEFINED NO_FORTIFY_SOURCE) |
| 94 | + # Security flag that adds compile-time and run-time checks. |
| 95 | +- set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -D_FORTIFY_SOURCE=2") |
| 96 | ++ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") |
| 97 | + endif() |
| 98 | + endif() |
| 99 | + |
| 100 | +@@ -51,7 +51,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Werror") |
| 101 | + # Linker flags |
| 102 | + |
| 103 | + # Create shared library |
| 104 | +-set(LINK_FLAGS_DYNAMIC " -Wl,-shared") |
| 105 | ++set(LINK_FLAGS_DYNAMIC " -Wl,-shared,-fuse-ld=bfd") |
| 106 | + # Add export files |
| 107 | + set(LINK_FLAGS_DYNAMIC "${LINK_FLAGS_DYNAMIC} ${CRYPTO_MB_SOURCES_DIR}/cmake/dll_export/crypto_mb.linux.lib-export") |
| 108 | + |
| 109 | +@@ -69,6 +69,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") |
| 110 | + |
| 111 | + # Suppress warnings from casts from a pointer to an integer type of a different size |
| 112 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-to-int-cast") |
| 113 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -Wno-missing-braces -Wno-comment -Wno-strict-aliasing -Wno-parentheses") |
| 114 | + |
| 115 | + # Optimization level = 3, no-debug definition (turns off asserts) |
| 116 | + set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG") |
| 117 | +diff --git a/sources/ippcp/crypto_mb/src/cmake/macosx/AppleClang.cmake b/sources/ippcp/crypto_mb/src/cmake/macosx/AppleClang.cmake |
| 118 | +index ea1641d..f98fc2d 100644 |
| 119 | +--- a/sources/ippcp/crypto_mb/src/cmake/macosx/AppleClang.cmake |
| 120 | ++++ b/sources/ippcp/crypto_mb/src/cmake/macosx/AppleClang.cmake |
| 121 | +@@ -17,10 +17,6 @@ |
| 122 | + # Security Linker flags |
| 123 | + |
| 124 | + set(LINK_FLAG_SECURITY "") |
| 125 | +-# Data relocation and protection (RELRO) |
| 126 | +-set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,relro -Wl,-z,now") |
| 127 | +-# Stack execution protection |
| 128 | +-set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,noexecstack") |
| 129 | + |
| 130 | + # Security Compiler flags |
| 131 | + |
| 132 | +@@ -30,7 +26,7 @@ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -Wformat -Wformat-security |
| 133 | + |
| 134 | + if(${CMAKE_BUILD_TYPE} STREQUAL "Release") |
| 135 | + # Security flag that adds compile-time and run-time checks. |
| 136 | +- set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -D_FORTIFY_SOURCE=2") |
| 137 | ++ set(CMAKE_C_FLAGS_SECURITY "${CMAKE_C_FLAGS_SECURITY} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") |
| 138 | + endif() |
| 139 | + |
| 140 | + # Stack-based Buffer Overrun Detection |
| 141 | +@@ -65,6 +61,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") |
| 142 | + # Suppress warnings from casts from a pointer to an integer type of a different size |
| 143 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-to-int-cast") |
| 144 | + |
| 145 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-variable -Wno-unknown-pragmas -Wno-missing-braces -Wno-unknown-warning-option") |
| 146 | ++ |
| 147 | + # Optimization level = 3, no-debug definition (turns off asserts) |
| 148 | + set(CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG") |
| 149 | + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") |
| 150 | + |
| 151 | +diff --git a/sources/cmake/linux/Clang9.0.0.cmake b/sources/cmake/linux/Clang9.0.0.cmake |
| 152 | +index 0015431..f93411c 100644 |
| 153 | +--- a/sources/cmake/linux/Clang9.0.0.cmake |
| 154 | ++++ b/sources/cmake/linux/Clang9.0.0.cmake |
| 155 | +@@ -79,7 +79,7 @@ endif() |
| 156 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcf-protection=full") |
| 157 | + |
| 158 | + # Security flag that adds compile-time and run-time checks |
| 159 | +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2") |
| 160 | ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") |
| 161 | + |
| 162 | + if(NOT NONPIC_LIB) |
| 163 | + # Position Independent Execution (PIE) |
| 164 | +@@ -107,7 +107,7 @@ if(SANITIZERS) |
| 165 | + endif(SANITIZERS) |
| 166 | + |
| 167 | + # Optimization level = 3, no-debug definition (turns off asserts), warnings=errors |
| 168 | +-set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror") |
| 169 | ++set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Werror -Wno-unused-function -Wno-missing-braces -Wno-unused-but-set-variable -Wno-unknown-pragmas") |
| 170 | + |
| 171 | + # DEBUG flags - optimization level = 0, generation GDB information (-g) |
| 172 | + set (CMAKE_C_FLAGS_DEBUG " -O0 -g") |
0 commit comments