Disable PIE
authorBen Hutchings <ben@decadent.org.uk>
Sun, 6 Jan 2019 03:44:40 +0000 (03:44 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 6 Jan 2019 19:33:01 +0000 (19:33 +0000)
We link all executables as non-relocatable, so it makes no sense to
generate PIE code.  In addition, PIE code on i386 requires a working
GOT which we don't generate.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name disable-pie.patch

scripts/Kbuild.klibc

index f500d5358ef66afc8254af6f76ad065fdf52a8e7..30a7f1f3e1e42e1ee28ce0b8fa761a16c2840732 100644 (file)
@@ -67,7 +67,8 @@ include $(srctree)/scripts/Kbuild.include
 # ---------------------------------------------------------------------------
 
 KLIBCREQFLAGS     := $(call cc-option, -fno-stack-protector, ) \
-                     $(call cc-option, -fwrapv, )
+                     $(call cc-option, -fwrapv, ) \
+                     $(call cc-option, -fno-PIE, )
 KLIBCARCHREQFLAGS :=
 KLIBCOPTFLAGS     :=
 KLIBCWARNFLAGS    := -W -Wall -Wno-sign-compare -Wno-unused-parameter