With OpenSSL soon to be updated to 3.0, the gost engine will have to be bumped as well. Gost 3.0.0.1 will not build with OpenSSL 1.1. To avoid disruption, this commit detects the OpenSSL version from ENGINES_DIR in include/openssl-engin, and sets the package version accordingly. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
59 lines
1.3 KiB
Diff
59 lines
1.3 KiB
Diff
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -64,31 +64,35 @@ else()
|
|
add_definitions(-DL_ENDIAN)
|
|
endif()
|
|
|
|
-check_c_source_runs("
|
|
- #ifdef _MSC_VER
|
|
- # include <intrin.h>
|
|
- #else
|
|
- # include <x86intrin.h>
|
|
- #endif
|
|
- int main(void) {
|
|
- unsigned long long x = -1, y = 1, r;
|
|
- unsigned char cf;
|
|
- cf = _addcarry_u64(1, x, y, &r);
|
|
- return !(cf == 1 && r == 1);
|
|
- }
|
|
- " ADDCARRY_U64)
|
|
+if(NOT CMAKE_CROSSCOMPILING)
|
|
+ check_c_source_runs("
|
|
+ #ifdef _MSC_VER
|
|
+ # include <intrin.h>
|
|
+ #else
|
|
+ # include <x86intrin.h>
|
|
+ #endif
|
|
+ int main(void) {
|
|
+ unsigned long long x = -1, y = 1, r;
|
|
+ unsigned char cf;
|
|
+ cf = _addcarry_u64(1, x, y, &r);
|
|
+ return !(cf == 1 && r == 1);
|
|
+ }
|
|
+ " ADDCARRY_U64)
|
|
+
|
|
+ check_c_source_runs("
|
|
+ int main(void) {
|
|
+ char buf[16] = { 0, 1, 2 };
|
|
+ int *p = (int *)(buf + 1);
|
|
+ int *q = (int *)(buf + 2);
|
|
+ return (*p == *q);
|
|
+ }
|
|
+ " RELAXED_ALIGNMENT)
|
|
+endif()
|
|
+
|
|
if (ADDCARRY_U64)
|
|
add_definitions(-DHAVE_ADDCARRY_U64)
|
|
endif()
|
|
|
|
-check_c_source_runs("
|
|
- int main(void) {
|
|
- char buf[16] = { 0, 1, 2 };
|
|
- int *p = (int *)(buf + 1);
|
|
- int *q = (int *)(buf + 2);
|
|
- return (*p == *q);
|
|
- }
|
|
- " RELAXED_ALIGNMENT)
|
|
if (NOT RELAXED_ALIGNMENT)
|
|
add_definitions(-DSTRICT_ALIGNMENT)
|
|
endif()
|