summaryrefslogtreecommitdiff
path: root/sys-apps/systemd
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-05-07 19:15:22 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-05-07 19:15:22 +0000
commit299816f0c09b4fa9b0ed7e30ea69cbd6942edbf7 (patch)
treeb0cfe55c53a1cfe6c89afc96b9d2b9947d694bff /sys-apps/systemd
parent6dd565aea2fc1e47796bb22fc2ec929c74dfa246 (diff)
downloadbaldeagleos-repo-299816f0c09b4fa9b0ed7e30ea69cbd6942edbf7.tar.gz
baldeagleos-repo-299816f0c09b4fa9b0ed7e30ea69cbd6942edbf7.tar.xz
baldeagleos-repo-299816f0c09b4fa9b0ed7e30ea69cbd6942edbf7.zip
Adding metadata
Diffstat (limited to 'sys-apps/systemd')
-rw-r--r--sys-apps/systemd/files/systemd-260.1-gcc-17.patch45
-rw-r--r--sys-apps/systemd/systemd-260.1.ebuild1
2 files changed, 46 insertions, 0 deletions
diff --git a/sys-apps/systemd/files/systemd-260.1-gcc-17.patch b/sys-apps/systemd/files/systemd-260.1-gcc-17.patch
new file mode 100644
index 000000000000..a73c6c7957b5
--- /dev/null
+++ b/sys-apps/systemd/files/systemd-260.1-gcc-17.patch
@@ -0,0 +1,45 @@
+From 64b1e6be83f49b9fdebc9e07cc3b7485169970c2 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Tue, 5 May 2026 21:55:30 +0100
+Subject: [PATCH] sd-boot: efi-log: fix `__stack_chk_guard` type
+
+In https://gcc.gnu.org/PR121911 `gcc` started enforcing the type of
+`__stack_chk_guard` to `uintptr_t` and broke `systemd` build as:
+
+```
+../src/boot/efi-log.c:136:17: error: conflicting types for '__stack_chk_guard'; have 'intptr_t' {aka 'long int'}
+ 136 | _used_ intptr_t __stack_chk_guard = (intptr_t) 0x70f6967de78acae3;
+ | ^~~~~~~~~~~~~~~~~
+cc1: note: previous declaration of '__stack_chk_guard' with type 'long unsigned int'
+../src/boot/efi-log.c:136:17: error: declaration of '__stack_chk_guard' shadows a global declaration [-Werror=shadow]
+ 136 | _used_ intptr_t __stack_chk_guard = (intptr_t) 0x70f6967de78acae3;
+ | ^~~~~~~~~~~~~~~~~
+```
+
+Let's match the declaration to unsigned type as suggested by upstream in
+https://gcc.gnu.org/PR121911#c6.
+---
+ src/boot/efi-log.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/boot/efi-log.c b/src/boot/efi-log.c
+index ed0a2746933e0..520f985389c55 100644
+--- a/src/boot/efi-log.c
++++ b/src/boot/efi-log.c
+@@ -133,7 +133,7 @@ void log_wait(void) {
+ }
+
+ // NOLINTNEXTLINE(misc-use-internal-linkage)
+-_used_ intptr_t __stack_chk_guard = (intptr_t) 0x70f6967de78acae3;
++_used_ uintptr_t __stack_chk_guard = (uintptr_t) 0x70f6967de78acae3;
+
+ /* We can only set a random stack canary if this function attribute is available,
+ * otherwise this may create a stack check fail. */
+@@ -144,7 +144,7 @@ void __stack_chk_guard_init(void) {
+ (void) rng->GetRNG(rng, NULL, sizeof(__stack_chk_guard), (void *) &__stack_chk_guard);
+ else
+ /* Better than no extra entropy. */
+- __stack_chk_guard ^= (intptr_t) __executable_start;
++ __stack_chk_guard ^= (uintptr_t) __executable_start;
+ }
+ #endif
diff --git a/sys-apps/systemd/systemd-260.1.ebuild b/sys-apps/systemd/systemd-260.1.ebuild
index b53f9b8951b8..155c99b8ea45 100644
--- a/sys-apps/systemd/systemd-260.1.ebuild
+++ b/sys-apps/systemd/systemd-260.1.ebuild
@@ -258,6 +258,7 @@ src_prepare() {
local PATCHES=(
"${FILESDIR}/systemd-260.1-fuzz-journald.patch"
"${FILESDIR}/systemd-260.1-openssl-4.patch"
+ "${FILESDIR}/systemd-260.1-gcc-17.patch"
)
if ! use vanilla; then