[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#841438: --enable-default-pie breaks kernel build on amd64

control: severity -1 normal
control: reassign -1 src:linux
control: affects -1 gcc-6

Hi Linux Kernel maintainers,
as you already know, the default PIE flag breaks the kernel build, can I suggest you to apply a similar patch
to the one that Ubuntu appplied some time ago?

--- a/Makefile
+++ b/Makefile
@@ -612,6 +612,12 @@ endif # $(dot-config)
 # Defaults to vmlinux, but the arch makefile usually adds further targets
 all: vmlinux
+# force no-pie for distro compilers that enable pie by default
+KBUILD_CFLAGS += $(call cc-option, -fno-pie)
+KBUILD_CFLAGS += $(call cc-option, -no-pie)
+KBUILD_AFLAGS += $(call cc-option, -fno-pie)
+KBUILD_CPPFLAGS += $(call cc-option, -fno-pie)
 # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
 # values of the respective KBUILD_* variables



Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: