linux-sgx/0006-Fix-compat-with-gcc-14.patch
Daniel P. Berrangé b26306ecae Honour CFLAGS/CXXFLAGS/LDFLAGS for host software
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-16 15:44:33 +01:00

49 lines
1.6 KiB
Diff

From 44c7af2d59a9654009eb1ea6affe771927d24850 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Mon, 24 Jun 2024 17:36:13 +0100
Subject: [PATCH 06/16] Fix compat with gcc 14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With refactoring of libstdc++, the <algorithm> header is no
longer pulled in indirectly, so must be explicitly requested.
The C++ standard for aesm must also be bumped to 14 to ensure
that std::enable_if_t is available.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
psw/ae/aesm_service/source/CMakeLists.txt | 2 +-
psw/enclave_common/sgx_enclave_common.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/psw/ae/aesm_service/source/CMakeLists.txt b/psw/ae/aesm_service/source/CMakeLists.txt
index 3edd77c7..89b3e3ae 100644
--- a/psw/ae/aesm_service/source/CMakeLists.txt
+++ b/psw/ae/aesm_service/source/CMakeLists.txt
@@ -61,7 +61,7 @@ if(REF_LE)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED 1)
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_SKIP_BUILD_RPATH true)
########## SGX SDK Settings ##########
diff --git a/psw/enclave_common/sgx_enclave_common.cpp b/psw/enclave_common/sgx_enclave_common.cpp
index 9867ecc8..46fcf873 100644
--- a/psw/enclave_common/sgx_enclave_common.cpp
+++ b/psw/enclave_common/sgx_enclave_common.cpp
@@ -35,6 +35,7 @@
#include <dlfcn.h>
#include <map>
#include <functional>
+#include <algorithm>
#include "sgx_enclave_common.h"
#include "sgx_urts.h"
#include "arch.h"
--
2.48.1