[PATCH RT 4/5] kbuild: add -fno-PIE

Steven Rostedt
2016-10-30T16:47:06Z

[-- Attachment #1: 0004-kbuild-add-fno-PIE.patch --]
[-- Type: text/plain, Size: 970 bytes --]

4.1.35-rt41-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

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

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 21f657f2c4e6..384ef0e05826 100644
--- a/Makefile
+++ b/Makefile
@@ -400,7 +400,7 @@ 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 :=
--
2.9.3