aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/Makefile_32.cpu
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-08 15:01:48 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-09-09 14:52:41 -0400
commit28f7e66fc1da53997a545684b21b91fb3ca3f321 (patch)
treef739409c143ab252deefb210858c663e15924878 /arch/x86/Makefile_32.cpu
parent43789e21638626d826c0e8d62e50ceb76b9d61ed (diff)
x86: prevent binutils from being "smart" and generating NOPLs for us
binutils, contrary to documented behaviour, will generate long NOPs (a P6-or-higher instruction which is broken on at least some VIA chips, Virtual PC/Virtual Server, and some versions of Qemu) depending on the -mtune= option, which is not supposed to change architectural behaviour. Pass an explicit override to the assembler, in case ends up passing the -mtune= parameter to gas (gcc 4.3.0 does not appear to.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/Makefile_32.cpu')
-rw-r--r--arch/x86/Makefile_32.cpu5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index e372b584e919..b72b4f753113 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -45,3 +45,8 @@ cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
45# cpu entries 45# cpu entries
46cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686)) 46cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
47 47
48# Bug fix for binutils: this option is required in order to keep
49# binutils from generating NOPL instructions against our will.
50ifneq ($(CONFIG_X86_P6_NOP),y)
51cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,)
52endif