ANDROID: arch: x86: disable pic for Android toolchain
authorGreg Hackmann <ghackmann@google.com>
Thu, 23 Jul 2015 17:40:57 +0000 (10:40 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 1 Dec 2016 09:48:44 +0000 (15:18 +0530)
Android toolchains enable PIC, so explicitly disable it with
-fno-pic (this is the upstream gcc default)

Signed-off-by: Greg Hackmann <ghackmann@google.com>
(cherry picked from commit 892606ece2bebfa5a1ed62e9552cc973707ae9d3)

Change-Id: I1e600363e5d18e459479fe4eb23d76855e16868d

arch/x86/Makefile

index 4086abca0b32345c92207fa75468cc98ebe97da4..53949c8863414c2dc8d77219b2b6c0c6d82d4fd9 100644 (file)
@@ -97,6 +97,8 @@ else
         KBUILD_CFLAGS += $(call cc-option,-mno-80387)
         KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)
 
+        KBUILD_CFLAGS += -fno-pic
+
        # Use -mpreferred-stack-boundary=3 if supported.
        KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)