Message ID | 20210627184708.17496-1-mail@cbaines.net |
---|---|
State | Accepted |
Headers | show |
Series | [bug#49244] gnu: grub-efi: Only enable the stack protector on x86_64-linux. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
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. Thanks, Mathieu
Mathieu Othacehe schreef op di 29-06-2021 om 17:36 [+0200]: > 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. Or rather, (string-prefix? (or (%current-target-system) (%current-system)) "x86_64") (or was it the other way around)? Greetings, Maxime.
Mathieu Othacehe <othacehe@gnu.org> 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
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