From 8ba70e0acf5dbc573d8c6efd55388e48e97dbcee Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Thu, 26 Oct 2017 15:39:19 -0700 Subject: [PATCH] Revert "Revert "UPSTREAM: efi/libstub/arm64: Set -fpie when building the EFI stub"" In isolation, the original change will break building efistub for ARM64 with gcc. This wasn't an issue upstream due to the earlier change 60f38de7a8d4 ("efi/libstub: Unify command line param parsing"). That's now been backported to AOSP too. This reverts commit 89805266af7825f6b8ccb8ff23a8e3aec4418dea. Change-Id: I44eff2d17809b18181e2084abaf129ca4e2eb8d6 Signed-off-by: Greg Hackmann --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index c4098748e1fe..0e4b85e31b69 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -10,7 +10,7 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) +cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ -fno-builtin -fpic -mno-single-pic-base