Subject: bug#49244: closed (Re: bug#49244: [PATCH] gnu: grub-efi: Only enable the stack protector on x86_64-linux.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 01 Jul 2021 23:31:02 +0000

Your bug report

#49244: [PATCH] gnu: grub-efi: Only enable the stack protector on x86_64-linux.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
49244: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49244
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#49244: [PATCH] gnu: grub-efi: Only enable the stack protector on x86_64-linux.
From: Christopher Baines <[email-masked]>
To: [email-masked]
Cc: Mathieu Othacehe <[email-masked]>
Date: Fri, 02 Jul 2021 00:30:58 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Mathieu Othacehe <[email-masked]> writes:

> Hey Chris,
>
>> +                    ,@(if (string=? (%current-system)
>> +                                    "x86_64-linux")
>> +                          '("--enable-stack-protector") ; EFI-only for now
>> +                          '())
>
> Maybe we should also avoid this option when cross-compiling? Otherwise
> it looks OK.

Yeah, I was trying to test the cross-compiling case, but I think
something else fails regardless. Anyway, I've pushed something similar
to what Maxime suggested as fd549750d9ab23a0505aeb4c03e1299e860a4f16.

Thanks,

CHris

Subject: [PATCH] gnu: grub-efi: Only enable the stack protector on x86_64-linux.
From: Christopher Baines <[email-masked]>
To: [email-masked]
Date: Sun, 27 Jun 2021 19:47:08 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Follow up to 018f95094153660e3041ec160718f0bda286a3dc, as gcc on aarch64-linux
doesn't seem to support -mstack-protector-guard=global.

* gnu/packages/bootloaders.scm (grub-efi)[arguments]: Only add
"--enable-stack-protector" to #:configure-flags when system is x86_64-linux.
---
 gnu/packages/bootloaders.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index e83f21ea63..1ff0348ac7 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -303,7 +303,10 @@ menu to select one of the installed operating systems.")
            ((#:tests? _ #f) #f)
            ((#:configure-flags flags ''())
             `(cons* "--with-platform=efi"
-                    "--enable-stack-protector" ; EFI-only for now
+                    ,@(if (string=? (%current-system)
+                                    "x86_64-linux")
+                          '("--enable-stack-protector") ; EFI-only for now
+                          '())
                     ,flags))
            ((#:phases phases)
             `(modify-phases ,phases
-- 
2.32.0