grub: build with -Os instead of -O2.
Fixes being stuck at "GRUB loading." when booting through legacy BIOS. Upstream bug: https://savannah.gnu.org/bugs/?60458 Related discussion: https://www.linuxquestions.org/questions/showthread.php?p=6257712 Closes: #31795 [via git-merge-pr]
This commit is contained in:
parent
7fe28ebf98
commit
1d3ebb0be6
1 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'grub'
|
||||
pkgname=grub
|
||||
version=2.06
|
||||
revision=1
|
||||
revision=2
|
||||
hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf help2man"
|
||||
makedepends="libusb-compat-devel ncurses-devel freetype-devel
|
||||
liblzma-devel device-mapper-devel fuse-devel"
|
||||
|
@ -44,6 +44,13 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
esac
|
||||
|
||||
do_configure() {
|
||||
# workaround for https://savannah.gnu.org/bugs/?60458
|
||||
# some more info: https://www.linuxquestions.org/questions/showthread.php?p=6257712
|
||||
# grub 2.06 reboots immediately when compiled with -O2,
|
||||
# only affects legacy BIOS
|
||||
export CFLAGS="${CFLAGS/-O2/-Os}"
|
||||
export CXXFLAGS="${CXXFLAGS/-O2/-Os}"
|
||||
|
||||
unset CC AS LD RANLIB CPP
|
||||
local freestanding_cflags="-fno-stack-protector"
|
||||
|
||||
|
|
Loading…
Reference in a new issue