Skip to content

Commit

Permalink
x86: correctly set UTS_MACHINE for "make ARCH=x86"
Browse files Browse the repository at this point in the history
For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

    $ uname -m
    x86

On some i386 systems (e.g. K7) we even have the following information

    $ uname -m
    x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andreas Herrmann authored and Linus Torvalds committed Nov 27, 2007
1 parent 2ffbb83 commit 8c6531f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ endif
$(srctree)/arch/x86/Makefile%: ;

ifeq ($(CONFIG_X86_32),y)
UTS_MACHINE := i386
include $(srctree)/arch/x86/Makefile_32
else
UTS_MACHINE := x86_64
include $(srctree)/arch/x86/Makefile_64
endif



0 comments on commit 8c6531f

Please sign in to comment.