]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: prevent binutils from being "smart" and generating NOPLs for us
authorH. Peter Anvin <hpa@zytor.com>
Mon, 8 Sep 2008 19:01:48 +0000 (12:01 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 9 Sep 2008 18:52:41 +0000 (11:52 -0700)
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>
arch/x86/Makefile_32.cpu

index e372b584e9190ab5095e3b0defdde166625361e9..b72b4f7531138cbc4c5042ac90942e752a74b8a4 100644 (file)
@@ -45,3 +45,8 @@ cflags-$(CONFIG_MGEODEGX1)    += -march=pentium-mmx
 # cpu entries
 cflags-$(CONFIG_X86_GENERIC)   += $(call tune,generic,$(call tune,i686))
 
+# Bug fix for binutils: this option is required in order to keep
+# binutils from generating NOPL instructions against our will.
+ifneq ($(CONFIG_X86_P6_NOP),y)
+cflags-y                       += $(call cc-option,-Wa$(comma)-mtune=generic32,)
+endif