diff options
Diffstat (limited to 'core/grub/build')
-rwxr-xr-x | core/grub/build | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/core/grub/build b/core/grub/build index d0cee821..c937d263 100755 --- a/core/grub/build +++ b/core/grub/build @@ -1,6 +1,21 @@ #!/bin/sh -e -# Grub is built in a function so the script argument needs to be stored. +# Grub expects Python but it isn't actually needed. Give +# it something fake so that configure passes. +export PYTHON=/bin/true + +# Disable the post-python mv calls as a means of disabling +# the Python tooling. The /bin/true above will create a +# blank file, this prevents the blank file from overwriting +# the existing one. +sed -i 's/mv $@.new $@/:/g' grub/Makefile.in + +# Strip '-march' from 'CFLAGS' as per advice from upstream. +# Fixes build fails on specific hardware. +CFLAGS=$(printf %s "$CFLAGS" | sed 's/-march=[^ ]*//g') + +# Grub is built in a function so the script argument +# needs to be stored. pkg_dir=$1 build_grub() ( @@ -12,6 +27,7 @@ build_grub() ( --sbindir=/usr/bin \ --sysconfdir=/etc \ --disable-werror \ + --disable-nls \ --disable-grub-mkfont \ --disable-grub-mount \ "$@" |