x86/kexec: add -fno-PIE
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 4 Nov 2016 18:39:40 +0000 (19:39 +0100)
committerSasha Levin <alexander.levin@verizon.com>
Fri, 23 Dec 2016 02:04:32 +0000 (21:04 -0500)
[ Upstream commit 90944e40ba1838de4b2a9290cf273f9d76bd3bdd ]

If the gcc is configured to do -fPIE by default then the build aborts
later with:
| Unsupported relocation type: unknown type rel type name (29)

Tagging it stable so it is possible to compile recent stable kernels as
well.

Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
arch/x86/purgatory/Makefile

index 2c835e356349b9284b6b6997fff19208b6dd1b61..d445c5f1aeb1f8f162ae348686918b4297ffa6df 100644 (file)
@@ -12,6 +12,7 @@ targets += purgatory.ro
 
 KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large
 KBUILD_CFLAGS += -m$(BITS)
+KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
 
 $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
                $(call if_changed,ld)