aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorGeorge Spelvin <linux@horizon.com>2014-05-07 17:05:52 -0400
committerShow Liu <show.liu@linaro.org>2014-06-18 11:43:09 +0800
commit2874314c766dfaa1dd49d9baaad95749d6e85ac2 (patch)
treef0c71cbfb885e27a9dc5045c3cbabc334a343334 /arch/x86/Makefile
parent2e612ab9b84105c335b6a6a78ec4aa1f6ac97123 (diff)
x86-64, build: Fix stack protector Makefile breakage with 32-bit userland
commit 14262d67fe348018af368a07430fbc06eadeabb1 upstream. If you are using a 64-bit kernel with 32-bit userland, then scripts/gcc-x86_64-has-stack-protector.sh invokes 32-bit gcc with -mcmodel=kernel, which produces: <stdin>:1:0: error: code model 'kernel' not supported in the 32 bit mode and trips the "broken compiler" test at arch/x86/Makefile:120. There are several places a fix is possible, but the following seems cleanest. (But it's minimal; it would also be possible to factor out a bunch of stuff from the two branches of the if.) Signed-off-by: George Spelvin <linux@horizon.com> Link: http://lkml.kernel.org/r/20140507210552.7581.qmail@ns.horizon.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index d92cef2b9da..c83b7d1d438 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -80,6 +80,7 @@ else
UTS_MACHINE := x86_64
CHECKFLAGS += -D__x86_64__ -m64
+ biarch := -m64
KBUILD_AFLAGS += -m64
KBUILD_CFLAGS += -m64