linux-sgx/0112-Workaround-broken-GCC-15.patch
Daniel P. Berrangé 12589a1af6 Port to pycryptography and pyasn1 and make keyring optional
pyOpenSSL 24.0.0 removed several APIs required by pccsadmin, so
porting to pycryptography is required on Fedora. Since RHEL does
not ship pyOpenSSL, the port is useful here too.

Using pyasn1 instead of asn1 gives stronger validation during
parsing and brings compatibility with RHEL that lacks python3-asn1

The keyring package needs to be optional on RHEL which lacks this
module (currently).

Also drop the inappropriate pccs port number change

Related: https://issues.redhat.com/browse/RHEL-121612
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-12-10 11:17:54 +00:00

41 lines
1.5 KiB
Diff

From ac446d8943858e6dccec924451b8a8a3be4d9c4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Thu, 6 Feb 2025 20:08:59 +0000
Subject: [PATCH 112/126] Workaround broken GCC 15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The C++ standard does not allow 'alignas' to be applied to type
aliases. GNU C++ has allowed it as a non-standard extension, but
strictly that should have been expressed using 'gnu::aligned'
instead of 'alignas'. Regardless of the syntax, however, GCC 15
has a regression causing it to reject alignment requests entirely
on template aliases.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118773
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
.../common/inc/internal/linux/sgx_random_buffers.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/QuoteGeneration/common/inc/internal/linux/sgx_random_buffers.h b/QuoteGeneration/common/inc/internal/linux/sgx_random_buffers.h
index 15fbdd4..4400544 100644
--- a/QuoteGeneration/common/inc/internal/linux/sgx_random_buffers.h
+++ b/QuoteGeneration/common/inc/internal/linux/sgx_random_buffers.h
@@ -258,7 +258,11 @@ struct alignas(A)randomly_placed_buffer
}
template <unsigned C = 1>
+#if __GNUC__ == 15 && __GNUC_MINOR__ == 0
+ using storage = char[size(C)];
+#else
using storage = char[size(C)] alignas(A);
+#endif
private:
struct alignas(A)_T_instantiator_
--
2.51.1