From: tip-bot for David Ahern <dsahern@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, fweisbec@gmail.com, stable@kernel.org,
dsahern@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf tools, x86: Fix 32-bit compile on 64-bit system
Date: Thu, 21 Jul 2011 15:36:50 GMT [thread overview]
Message-ID: <tip-08a4a43fc407d780bdde36d98f89c0dbb2a6be6b@git.kernel.org> (raw)
In-Reply-To: <1310420304-21452-1-git-send-email-dsahern@gmail.com>
Commit-ID: 08a4a43fc407d780bdde36d98f89c0dbb2a6be6b
Gitweb: http://git.kernel.org/tip/08a4a43fc407d780bdde36d98f89c0dbb2a6be6b
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Mon, 11 Jul 2011 15:38:24 -0600
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 21 Jul 2011 13:42:30 +0200
perf tools, x86: Fix 32-bit compile on 64-bit system
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 <dsahern@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1310420304-21452-1-git-send-email-dsahern@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/Makefile | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 940257b..c168366 100644
--- 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
next prev parent reply other threads:[~2011-07-21 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 21:38 [PATCH] perf tools, x86: fix 32-bit compile on 64-bit system David Ahern
2011-07-11 21:38 ` David Ahern
2011-07-15 15:27 ` David Ahern
2011-07-15 15:27 ` David Ahern
2011-07-15 15:32 ` Frederic Weisbecker
2011-07-15 15:32 ` Frederic Weisbecker
2011-07-15 15:38 ` Peter Zijlstra
2011-07-21 14:30 ` David Ahern
2011-07-21 14:30 ` David Ahern
2011-07-21 15:36 ` tip-bot for David Ahern [this message]
2011-07-21 16:07 ` [tip:perf/urgent] perf tools, x86: Fix " H. Peter Anvin
2011-07-21 16:24 ` David Ahern
2011-07-21 18:03 ` H. Peter Anvin
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-08a4a43fc407d780bdde36d98f89c0dbb2a6be6b@git.kernel.org \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=stable@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.