1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Pick fix, based on what has been applied upstream into Linux
Index: user-mode-linux/arch/x86/Makefile
===================================================================
--- user-mode-linux.orig/arch/x86/Makefile 2016-11-26 14:27:13.000000000 +0530
+++ user-mode-linux/arch/x86/Makefile 2016-12-03 20:05:44.102220972 +0530
@@ -66,6 +66,9 @@
# prevent gcc from keeping the stack 16 byte aligned
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
+
+ # don't enable PIE for kernel
+ KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
# a lot more stack due to the lack of sharing of stacklots:
@@ -102,6 +105,9 @@
# Use -mskip-rax-setup if supported.
KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
+
+ # don't enable PIE for kernel
+ KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
|