This is a note to let you know that I've just added the patch titled

    perf tools, x86: Fix 32-bit compile on 64-bit system

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-tools-x86-fix-32-bit-compile-on-64-bit-system.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 08a4a43fc407d780bdde36d98f89c0dbb2a6be6b Mon Sep 17 00:00:00 2001
From: David Ahern <[email protected]>
Date: Mon, 11 Jul 2011 15:38:24 -0600
Subject: perf tools, x86: Fix 32-bit compile on 64-bit system

From: David Ahern <[email protected]>

commit 08a4a43fc407d780bdde36d98f89c0dbb2a6be6b upstream.

Builds for 32-bit perf binaries on a 64-bit host currently fail
with this error:

 [...]
 bench/../../../arch/x86/lib/memcpy_64.S: Assembler messages:
 bench/../../../arch/x86/lib/memcpy_64.S:29: Error: bad register name `%rdi'
 bench/../../../arch/x86/lib/memcpy_64.S:34: Error: invalid instruction suffix 
for `movs'
 bench/../../../arch/x86/lib/memcpy_64.S:50: Error: bad register name `%rdi'
 bench/../../../arch/x86/lib/memcpy_64.S:61: Error: bad register name `%rdi'
 ...

The problem is the detection of the host arch without considering passed in
flags. This change fixes 32-bit builds via:

make EXTRA_CFLAGS=-m32

and 64-bit builds still reference the memcpy_64.S.

Signed-off-by: David Ahern <[email protected]>
Acked-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: 
http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 tools/perf/Makefile |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -52,7 +52,10 @@ ifeq ($(ARCH),i386)
 endif
 ifeq ($(ARCH),x86_64)
        ARCH := x86
-       IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 1)
+       IS_X86_64 := 0
+       ifeq (, $(findstring m32,$(EXTRA_CFLAGS)))
+               IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 
1)
+       endif
        ifeq (${IS_X86_64}, 1)
                RAW_ARCH := x86_64
                ARCH_CFLAGS := -DARCH_X86_64


Patches currently in stable-queue which might be from [email protected] are

queue-3.0/perf-tools-x86-fix-32-bit-compile-on-64-bit-system.patch
queue-3.0/perf-tools-fix-endian-conversion-reading-event-attr-from.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to