Skip to content

Commit 561e01e

Browse files
arcolightdzabotlin
andauthored
IGNITE-27407 C++ Client: Fix compilation with gcc-15 (#7274)
Co-authored-by: dzabotlin <[email protected]>
1 parent e8f8454 commit 561e01e

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

modules/platforms/cpp/DEVNOTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ option disabled.
2525

2626
USE_LOCAL_DEPS option set to OFF implies that dependencies will be downloaded, so you will need an internet connection.
2727
If you want to build project with your local dependencies you can set option USE_LOCAL_DEPS to ON. In this case you need
28-
to specify location of the MbedTLS source code library with the MBEDTLS_SOURCE_DIR variable.
28+
to specify location of the TF-PSA source code library with the TF_PSA_SOURCE_DIR variable.
2929
In this case you have to install:
3030
* msgpack-c >= 4.0.0 development package (for Ubuntu: libmsgpack-dev)
3131
* Google test library >= 1.12.0 (for Ubuntu: libgtest-dev) if you want to build tests (ENABLE_TESTS = ON)
3232
* Google mock library >= 1.12.0 (for Ubuntu: libgmock-dev) if you want to build tests (ENABLE_TESTS = ON)
33-
* MbedTLS == v3.6.0 Source code needed as MbedTLS should be built with the ignite-3 config included
33+
* TF-PSA-Crypto == v1.0.0 Source code needed as TF-PSA-Crypto should be built with the ignite-3 config included
3434

3535
You should also specify the general (build type) CMake options. There are two types of build available - `Release` and `Debug`. The choice depends on how are you going to use the resulting artifacts. If you are going to use them in production, use the `Release` build type. If you are planning to just submit a patch for the project, use `Debug`.
3636

modules/platforms/cpp/cmake/dependencies.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(MBEDTLS_AS_SUBPROJECT ON)
2222

2323
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2424

25-
add_compile_definitions(MBEDTLS_USER_CONFIG_FILE="${CMAKE_CURRENT_SOURCE_DIR}/ignite/common/detail/ignite_mbedtls_config.h")
25+
add_compile_definitions(TF_PSA_CRYPTO_USER_CONFIG_FILE="${CMAKE_CURRENT_SOURCE_DIR}/ignite/common/detail/ignite_mbedtls_config.h")
2626

2727
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30.0")
2828
# Avoid warning about FetchContent_Populate:
@@ -53,11 +53,11 @@ if (${USE_LOCAL_DEPS})
5353
message(STATUS "MSGPACK FOUND: " ${msgpack_VERSION})
5454
endif()
5555

56-
if (NOT DEFINED MBEDTLS_SOURCE_DIR)
57-
message( FATAL_ERROR "With USE_LOCAL_DEPS specified you have to set MBEDTLS_SOURCE_DIR to path to the MbedTLS source code")
56+
if (NOT DEFINED TF_PSA_SOURCE_DIR)
57+
message( FATAL_ERROR "With USE_LOCAL_DEPS specified you have to set TF_PSA_SOURCE_DIR to path to the TF-PSA-Crypto source code")
5858
endif()
5959

60-
add_subdirectory(${MBEDTLS_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls EXCLUDE_FROM_ALL)
60+
add_subdirectory(${TF_PSA_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/tf-psa EXCLUDE_FROM_ALL)
6161
find_package(uni-algo CONFIG REQUIRED)
6262

6363
if (${ENABLE_TESTS})
@@ -72,11 +72,11 @@ if (${USE_LOCAL_DEPS})
7272
else()
7373
include(FetchContent)
7474
fetch_dependency(msgpack-c https://github.com/msgpack/msgpack-c/releases/download/c-6.0.1/msgpack-c-6.0.1.tar.gz 090df53a59b845767fcfc48221b30ee9)
75-
fetch_dependency(mbedtls https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2 6b5a45b10e7d1c768ecec69ecf8e7abd)
75+
fetch_dependency(tf-psa https://github.com/Mbed-TLS/TF-PSA-Crypto/releases/download/tf-psa-crypto-1.0.0/tf-psa-crypto-1.0.0.tar.bz2 39037452d0314496589ab18461c1535c)
7676
fetch_dependency(uni-algo https://github.com/uni-algo/uni-algo/archive/v1.2.0.tar.gz 6e0cce94a6b45ebee7b904316df9f87f)
7777
if (${ENABLE_TESTS})
7878
fetch_dependency(googletest https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz c8340a482851ef6a3fe618a082304cfc)
7979
endif()
8080
endif()
8181

82-
target_compile_definitions(mbedtls INTERFACE MBEDTLS_ALLOW_PRIVATE_ACCESS)
82+
target_compile_definitions(tfpsacrypto INTERFACE MBEDTLS_ALLOW_PRIVATE_ACCESS)

modules/platforms/cpp/ignite/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ set(SOURCES
5454

5555
add_library(${TARGET} STATIC ${SOURCES})
5656

57-
target_link_libraries(${TARGET} PUBLIC MbedTLS::mbedtls)
57+
target_link_libraries(${TARGET} PUBLIC TF-PSA-Crypto::tfpsacrypto)
5858

5959
target_include_directories(${TARGET} INTERFACE
6060
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>

modules/platforms/cpp/ignite/common/detail/mpi.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
#include "ignite_error.h"
2121

22-
#include <mbedtls/bignum.h>
22+
#include <tf-psa-crypto/build_info.h>
23+
#include <mbedtls/private/bignum.h>
2324

2425
#include <utility>
2526
#include <vector>

0 commit comments

Comments
 (0)