]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
build: Disable PIE in TARGET_CCASFLAGS if needed
authorMike Gilbert <floppym@gentoo.org>
Thu, 20 Feb 2020 06:51:42 +0000 (22:51 -0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 28 Feb 2020 11:35:30 +0000 (12:35 +0100)
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>
configure.ac

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