aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorAndrew Boie <andrew.p.boie@intel.com>2012-08-10 11:49:06 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-08-10 16:12:30 -0700
commit484d90eec884d814b005c9736bcf3fd018acba65 (patch)
tree69bbb6e3226d966e59aae0814eaccd8bd41ab1f0 /arch/x86/Makefile
parentc6fd893da927c6cefb2ece22402765379921a834 (diff)
downloadkernel_goldelico_gta04-484d90eec884d814b005c9736bcf3fd018acba65.zip
kernel_goldelico_gta04-484d90eec884d814b005c9736bcf3fd018acba65.tar.gz
kernel_goldelico_gta04-484d90eec884d814b005c9736bcf3fd018acba65.tar.bz2
x86, build: Globally set -fno-pic
GCC built with nonstandard options can enable -fpic by default. We never want this for 32-bit kernels and it will break the build. [ hpa: Notably the Android toolchain apparently does this. ] Change-Id: Iaab7d66e598b1c65ac4a4f0229eca2cd3d0d2898 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com> Link: http://lkml.kernel.org/r/1344624546-29691-1-git-send-email-andrew.p.boie@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index b0c5276..682e9c2 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -27,6 +27,10 @@ ifeq ($(CONFIG_X86_32),y)
KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
+ # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
+ # with nonstandard options
+ KBUILD_CFLAGS += -fno-pic
+
# prevent gcc from keeping the stack 16 byte aligned
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)