From: "tip-bot for H. Peter Anvin" <hpa@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
rankincj@yahoo.com, tglx@linutronix.de
Subject: [tip:x86/urgent] x86, compress: Force i386 instructions for the decompressor
Date: Sat, 26 Dec 2009 00:48:41 GMT [thread overview]
Message-ID: <tip-17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5@git.kernel.org> (raw)
In-Reply-To: <219280.97558.qm@web52907.mail.re2.yahoo.com>
Commit-ID: 17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5
Gitweb: http://git.kernel.org/tip/17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5
Author: H. Peter Anvin <hpa@zytor.com>
AuthorDate: Fri, 25 Dec 2009 15:40:38 -0800
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 25 Dec 2009 15:40:38 -0800
x86, compress: Force i386 instructions for the decompressor
Recently, some distros have started shipping versions of gcc which
default to -march=i686. This breaks building kernels for pre-i686
machines, even if they have been selected in Kconfig, due to the
generation of CMOV instructions.
There isn't enough benefit to try to preserve the generation of these
instructions even when selected, so simply force -march=i386 for the
decompressor when building a 32-bit kernel.
Reported-and-tested-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <219280.97558.qm@web52907.mail.re2.yahoo.com>
---
arch/x86/boot/compressed/Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index f8ed065..f25bbd3 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -9,6 +9,7 @@ targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinu
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
+cflags-$(CONFIG_X86_32) := -march=i386
cflags-$(CONFIG_X86_64) := -mcmodel=small
KBUILD_CFLAGS += $(cflags-y)
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
prev parent reply other threads:[~2009-12-26 0:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 15:28 [BUG] Kernel built for i586 chip crashes instantly at boot time (CMOV instructions) Chris Rankin
2009-12-18 17:12 ` H. Peter Anvin
2009-12-19 11:40 ` Chris Rankin
2009-12-26 0:48 ` tip-bot for H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5@git.kernel.org \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rankincj@yahoo.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox