* [PATCH] Stack protector Makefile breakage on x86_64
@ 2014-03-19 10:43 George Spelvin
2014-05-07 21:05 ` [PATCH RESEND] Fix stack " George Spelvin
0 siblings, 1 reply; 3+ messages in thread
From: George Spelvin @ 2014-03-19 10:43 UTC (permalink / raw)
To: arjan, tj, x86; +Cc: linux, linux-kernel
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:118.
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 btanches of the if.)
Signed-off-by: George Spelvin <linux@horizon.com>
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index eeda43abed..c6c61361c3 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH RESEND] Fix stack protector Makefile breakage on x86_64
2014-03-19 10:43 [PATCH] Stack protector Makefile breakage on x86_64 George Spelvin
@ 2014-05-07 21:05 ` George Spelvin
2014-05-07 21:48 ` [tip:x86/urgent] x86-64, build: Fix stack protector Makefile breakage with 32-bit userland tip-bot for George Spelvin
0 siblings, 1 reply; 3+ messages in thread
From: George Spelvin @ 2014-05-07 21:05 UTC (permalink / raw)
To: arjan, hpa, tj, x86; +Cc: linux, linux-kernel
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>
Cc: <stable@vger.kernel.org> # 3.14.x
---
Originally sent March 19 (but elicited no response), this is still an
issue with 3.15-rc4, and still applies without changes.
Sending to some general Linux-x86 people as well as the authors of the
stack-protector patch that caused the problem. Feel free to fix it a
different way, but could we please fix it?
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index eeda43abed..c6c61361c3 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/urgent] x86-64, build: Fix stack protector Makefile breakage with 32-bit userland
2014-05-07 21:05 ` [PATCH RESEND] Fix stack " George Spelvin
@ 2014-05-07 21:48 ` tip-bot for George Spelvin
0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for George Spelvin @ 2014-05-07 21:48 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, linux, tglx, hpa
Commit-ID: 14262d67fe348018af368a07430fbc06eadeabb1
Gitweb: http://git.kernel.org/tip/14262d67fe348018af368a07430fbc06eadeabb1
Author: George Spelvin <linux@horizon.com>
AuthorDate: Wed, 7 May 2014 17:05:52 -0400
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 7 May 2014 14:14:44 -0700
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:
<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
Cc: <stable@vger.kernel.org> # v3.14
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/Makefile | 1 +
1 file changed, 1 insertion(+)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-07 21:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 10:43 [PATCH] Stack protector Makefile breakage on x86_64 George Spelvin
2014-05-07 21:05 ` [PATCH RESEND] Fix stack " George Spelvin
2014-05-07 21:48 ` [tip:x86/urgent] x86-64, build: Fix stack protector Makefile breakage with 32-bit userland tip-bot for George Spelvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).