Subject: [PATCH 8/9] gnu: edk2-tools: Update to 202502.

From: Efraim Flashner <[email-masked]>
Date: Fri, 21 Mar 2025 10:53:09 +0200

* gnu/packages/firmware.scm (edk2-tools): Update to 202502.
[arguments]: When building on armhf-linux add a phase to adjust the
compiler flags.

Change-Id: Ia0586cb748194e4ec0fa35c2a04cee64f1ad6521
---
 gnu/packages/firmware.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 0becefb3b08..fe2956fbfdf 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -947,7 +947,7 @@ (define-public slof-qemu
 (define-public edk2-tools
   (package
     (name "edk2-tools")
-    (version "202402")
+    (version "202502")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -958,7 +958,7 @@ (define-public edk2-tools
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0y7jfpijgi099znhzjklnsczn0k0vm1d1qznq9x2a2sa0glydsin"))))
+                "026h7hadzj1zflgf4qzdby3gmgcqh3m5rvn2yr92jjwn4z8c51la"))))
     (build-system gnu-build-system)
     (arguments
      (list #:make-flags
@@ -1047,6 +1047,13 @@ (define* (make-ovmf-firmware arch)
                           "riscv64-linux-gnu-")
                   (setenv (string-append #$toolchain "_LOONGARCH64_PREFIX")
                           "loongarch64-linux-gnu-"))))
+            #$@(if (target-arm32?)
+                   #~((add-before 'configure 'fix-armhf-flags
+                        (lambda _
+                          (substitute* "BaseTools/Conf/tools_def.template"
+                            (("(DEFINE GCC_ARM_CC_FLAGS.*)-mstack-protector-guard=global" _ gcc-arm)
+                             (string-append gcc-arm "-fstack-protector-all"))))))
+                   #~())
             (replace 'configure
               (lambda _
                 (let* ((cwd (getcwd))
-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted