From: tip-bot for Masami Hiramatsu <mhiramat@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
akpm@linux-foundation.org, tglx@linutronix.de,
mhiramat@redhat.com, mingo@elte.hu
Subject: [tip:x86/urgent] x86: Fix objdump version check in chkobjdump.awk for different formats.
Date: Fri, 18 Dec 2009 18:06:37 GMT [thread overview]
Message-ID: <tip-8bee738bb1979c8bf7b42716b772522ab7d26b0c@git.kernel.org> (raw)
In-Reply-To: <20091218154012.16960.5113.stgit@dhcp-100-2-132.bos.redhat.com>
Commit-ID: 8bee738bb1979c8bf7b42716b772522ab7d26b0c
Gitweb: http://git.kernel.org/tip/8bee738bb1979c8bf7b42716b772522ab7d26b0c
Author: Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 18 Dec 2009 10:40:13 -0500
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 18 Dec 2009 09:26:56 -0800
x86: Fix objdump version check in chkobjdump.awk for different formats.
Different version of objdump says its version in different way;
GNU objdump 2.16.1
or
GNU objdump version 2.19.51.0.14-1.fc11 20090722
This patch uses the first argument which starts with a number
as version string.
Changes in v2:
- Remove unneeded increment.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <20091218154012.16960.5113.stgit@dhcp-100-2-132.bos.redhat.com>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/tools/chkobjdump.awk | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/x86/tools/chkobjdump.awk b/arch/x86/tools/chkobjdump.awk
index 5bbb5a3..fd1ab80 100644
--- a/arch/x86/tools/chkobjdump.awk
+++ b/arch/x86/tools/chkobjdump.awk
@@ -8,14 +8,24 @@ BEGIN {
od_sver = 19;
}
-/^GNU/ {
- split($3, ver, ".");
+/^GNU objdump/ {
+ verstr = ""
+ for (i = 3; i <= NF; i++)
+ if (match($(i), "^[0-9]")) {
+ verstr = $(i);
+ break;
+ }
+ if (verstr == "") {
+ printf("Warning: Failed to find objdump version number.\n");
+ exit 0;
+ }
+ split(verstr, ver, ".");
if (ver[1] > od_ver ||
(ver[1] == od_ver && ver[2] >= od_sver)) {
exit 1;
} else {
printf("Warning: objdump version %s is older than %d.%d\n",
- $4, od_ver, od_sver);
+ verstr, od_ver, od_sver);
print("Warning: Skipping posttest.");
# Logic is inverted, because we just skip test without error.
exit 0;
prev parent reply other threads:[~2009-12-18 18:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200912172326.nBHNQaQl024796@imap1.linux-foundation.org>
2009-12-17 23:57 ` [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk tip-bot for akpm@linux-foundation.org
2009-12-18 0:04 ` Masami Hiramatsu
2009-12-18 0:07 ` H. Peter Anvin
2009-12-18 0:18 ` Masami Hiramatsu
2009-12-18 0:25 ` H. Peter Anvin
2009-12-18 15:34 ` [PATCH x86/urgent] x86: Fix objdump version check in chkobjdump.awk for different formats Masami Hiramatsu
2009-12-18 15:32 ` Masami Hiramatsu
2009-12-18 15:40 ` [PATCH x86/urgent v2] " Masami Hiramatsu
2009-12-18 18:06 ` tip-bot for Masami Hiramatsu [this message]
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-8bee738bb1979c8bf7b42716b772522ab7d26b0c@git.kernel.org \
--to=mhiramat@redhat.com \
--cc=akpm@linux-foundation.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox