From: George Spelvin Date: Wed, 7 May 2014 21:05:52 +0000 (-0400) Subject: x86-64, build: Fix stack protector Makefile breakage with 32-bit userland X-Git-Tag: accepted/tizen/common/20141203.182822~101^2~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14262d67fe348018af368a07430fbc06eadeabb1;p=platform%2Fkernel%2Flinux-arm64.git x86-64, build: Fix stack protector Makefile breakage with 32-bit userland 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: :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 Link: http://lkml.kernel.org/r/20140507210552.7581.qmail@ns.horizon.com Cc: # v3.14 Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/Makefile b/arch/x86/Makefile index ce6ad7e..33f71b0 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -79,6 +79,7 @@ else UTS_MACHINE := x86_64 CHECKFLAGS += -D__x86_64__ -m64 + biarch := -m64 KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64