File gcs.patch of Package python313

--- Python-3.13.9/Python/asm_trampoline_aarch64.h.orig	2025-11-28 10:37:02.356952731 +0100
+++ Python-3.13.9/Python/asm_trampoline_aarch64.h	2025-11-28 10:38:38.310843590 +0100
@@ -32,8 +32,14 @@
   #define GNU_PROPERTY_AARCH64_POINTER_AUTH 0
 #endif
 
+#if defined(__ARM_FEATURE_GCS_DEFAULT) && __ARM_FEATURE_GCS_DEFAULT == 1
+#define GNU_PROPERTY_AARCH64_GCS (1<<2)
+#else
+#define GNU_PROPERTY_AARCH64_GCS 0 /* No GCS */
+#endif
+
 /* Add the BTI and PAC support to GNU Notes section */
-#if GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_POINTER_AUTH != 0
+#if GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_POINTER_AUTH != 0 || GNU_PROPERTY_AARCH64_GCS != 0
     .pushsection .note.gnu.property, "a"; /* Start a new allocatable section */
     .balign 8; /* align it on a byte boundry */
     .long 4; /* size of "GNU\0" */
@@ -42,7 +48,7 @@
     .asciz "GNU";
     .long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
     .long 4; /* Four bytes of data */
-    .long (GNU_PROPERTY_AARCH64_BTI|GNU_PROPERTY_AARCH64_POINTER_AUTH); /* BTI or PAC is enabled */
+    .long (GNU_PROPERTY_AARCH64_BTI|GNU_PROPERTY_AARCH64_POINTER_AUTH|GNU_PROPERTY_AARCH64_GCS); /* BTI or PAC or GCS is enabled */
     .long 0; /* padding for 8 byte alignment */
     .popsection; /* end the section */
 #endif
openSUSE Build Service is sponsored by