grub: correctly strip -march=native

Turns out grub also uses CXXFLAGS.
This commit is contained in:
Dylan Araps 2020-09-13 22:16:06 +03:00
parent f28c18cca7
commit 0d1aa38232
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -12,7 +12,8 @@ sed -i 's/mv $@.new $@/:/g' ./*/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')
CFLAGS=$(printf %s "$CFLAGS" | sed 's/-march=[^ ]*//g')
CFLAGS=$(printf %s "$CXXFLAGS" | sed 's/-march=[^ ]*//g')
# Grub is built in a function so the script argument
# needs to be stored.