38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 5f490bfc33f69f490c6c7a90889287e84f1556c0 Mon Sep 17 00:00:00 2001
|
||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||
Date: Fri, 21 Oct 2016 12:21:07 +0200
|
||
Subject: [PATCH] kbuild: add -fno-PIE
|
||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.8/older/patches-4.8.6-rt5.tar.xz
|
||
|
||
Debian started to build the gcc with -fPIE by default so the kernel
|
||
build ends before it starts properly with:
|
||
|kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
|
||
|
||
Also add to KBUILD_AFLAGSi due to:
|
||
|
||
|gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d … -mfentry -DCC_USING_FENTRY … vdso/vdso32/note.S
|
||
|arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in c ombination with -fpic
|
||
|
||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||
---
|
||
Makefile | 4 ++--
|
||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
||
--- a/Makefile
|
||
+++ b/Makefile
|
||
@@ -398,12 +398,12 @@ KBUILD_CPPFLAGS := -D__KERNEL__
|
||
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||
-fno-strict-aliasing -fno-common \
|
||
-Werror-implicit-function-declaration \
|
||
- -Wno-format-security \
|
||
+ -Wno-format-security -fno-PIE \
|
||
-std=gnu89
|
||
|
||
KBUILD_AFLAGS_KERNEL :=
|
||
KBUILD_CFLAGS_KERNEL :=
|
||
-KBUILD_AFLAGS := -D__ASSEMBLY__
|
||
+KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
|
||
KBUILD_AFLAGS_MODULE := -DMODULE
|
||
KBUILD_CFLAGS_MODULE := -DMODULE
|
||
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|