build: Disable PIE in TARGET_CCASFLAGS if needed

PIE should be disabled in assembly sources as well, or else GRUB will
fail to boot.

Bug: https://bugs.gentoo.org/667852

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
This commit is contained in:
Mike Gilbert 2020-02-19 22:51:42 -08:00 committed by Daniel Kiper
parent 3137ecd97c
commit c71be831f1

View file

@ -1263,6 +1263,7 @@ grub_CHECK_LINK_PIE
# `-fPIE' or '-fpie' and '-pie' in the default specs. # `-fPIE' or '-fpie' and '-pie' in the default specs.
if [ x"$pie_possible" = xyes ]; then if [ x"$pie_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie" TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS -fno-PIE -fno-pie"
fi fi
if [ x"$link_nopie_needed" = xyes ] || [ x"$pie_possible" = xyes ]; then if [ x"$link_nopie_needed" = xyes ] || [ x"$pie_possible" = xyes ]; then