All of lore.kernel.org
 help / color / mirror / Atom feed
* + arch-x86-tools-chkobjdumpawk-fix-it.patch added to -mm tree
@ 2009-12-17 23:26 akpm
  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
  0 siblings, 1 reply; 10+ messages in thread
From: akpm @ 2009-12-17 23:26 UTC (permalink / raw)
  To: mm-commits; +Cc: akpm, hpa, mingo, mingo, tglx


The patch titled
     arch/x86/tools/chkobjdump.awk: fix it
has been added to the -mm tree.  Its filename is
     arch-x86-tools-chkobjdumpawk-fix-it.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: arch/x86/tools/chkobjdump.awk: fix it
From: Andrew Morton <akpm@linux-foundation.org>

It says

Warning: objdump version  is older than 2.19
Warning: Skipping posttest.

because it used the wrong field from `objdump -v':

akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
GNU objdump 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/x86/tools/chkobjdump.awk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/x86/tools/chkobjdump.awk~arch-x86-tools-chkobjdumpawk-fix-it arch/x86/tools/chkobjdump.awk
--- a/arch/x86/tools/chkobjdump.awk~arch-x86-tools-chkobjdumpawk-fix-it
+++ a/arch/x86/tools/chkobjdump.awk
@@ -9,7 +9,7 @@ BEGIN {
 }
 
 /^GNU/ {
-	split($4, ver, ".");
+	split($3, ver, ".");
 	if (ver[1] > od_ver ||
 	    (ver[1] == od_ver && ver[2] >= od_sver)) {
 		exit 1;
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

origin.patch
readahead-add-blk_run_backing_dev.patch
kfifo-move-struct-kfifo-in-place-fix.patch
linux-next.patch
linux-next-fixup.patch
next-remove-localversion.patch
i-need-old-gcc.patch
revert-input-wistron_btns-switch-to-using-sparse-keymap-library.patch
drivers-media-video-cx23885-needs-kfifo-conversion.patch
drivers-gpu-drm-i915-i915_dmac-fix-unused-var.patch
arch-x86-tools-chkobjdumpawk-fix-it.patch
arch-x86-kernel-cpu-cpufreq-acpi-cpufreqc-avoid-cross-cpu-interrupts-by-using-smp_call_function_any.patch
cmpc_acpi-add-support-for-classmate-pc-acpi-devices.patch
cmpc_acpi-add-support-for-classmate-pc-acpi-devices-checkpatch-fixes.patch
drivers-gpu-drm-radeon-radeon_combiosc-fix-warning.patch
drivers-media-video-pmsc-needs-versionh.patch
timer-stats-fix-del_timer_sync-and-try_to_del_timer_sync.patch
drivers-leds-leds-ss4200c-fix-return-statement.patch
net-sctp-socketc-fix-warning.patch
proc_fops-convert-drivers-isdn-to-seq_file-fix2.patch
3x59x-fix-pci-resource-management.patch
bluetooth-fix-for-acer-bluetooth-optical-rechargeable-mouse.patch
fs-ext4-superc-fix-printk-warning.patch
atmel_serial-add-poll_get_char-and-poll_put_char-uart_ops.patch
scsi-aacraid-fix-memory-leak-checkpatch-fixes.patch
aoe-switch-to-the-new-bio_flush_dcache_pages-interface.patch
fs-improve-remountro-vs-buffercache-coherency.patch
drivers-net-wireless-iwlwifi-iwl-txc-fix-gcc-345-warning.patch
percpu-avoid-calling-__pcpu_ptr_to_addrnull.patch
frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch
spi-controller-driver-for-designware-spi-core.patch
spidev-use-declare_bitmap-instead-of-declaring-the-array.patch
char-cyclades-fix-compiler-warning.patch
zlib-optimize-inffast-when-copying-direct-from-output.patch
lib-add-support-for-lzo-compressed-kernels.patch
net-netfilter-ipvs-ip_vs_wrrc-use-lib-gcdc-fix.patch
reiser4-export-remove_from_page_cache-fix.patch
reiser4.patch
reiser4-remove-simple_prepare_write-usage-checkpatch-fixes.patch
fs-reiser4-contextc-current_is_pdflush-got-removed.patch
reiser4-fix.patch
slab-leaks3-default-y.patch
put_bh-debug.patch
getblk-handle-2tb-devices.patch
getblk-handle-2tb-devices-fix.patch
undeprecate-pci_find_device.patch
notify_change-callers-must-hold-i_mutex.patch


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  2009-12-17 23:26 + arch-x86-tools-chkobjdumpawk-fix-it.patch added to -mm tree akpm
@ 2009-12-17 23:57 ` tip-bot for akpm@linux-foundation.org
  2009-12-18  0:04   ` Masami Hiramatsu
  0 siblings, 1 reply; 10+ messages in thread
From: tip-bot for akpm@linux-foundation.org @ 2009-12-17 23:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, akpm, tglx, mhiramat, mingo

Commit-ID:  8c63450718ea62ee3a70bffde170b4d15fc72d3c
Gitweb:     http://git.kernel.org/tip/8c63450718ea62ee3a70bffde170b4d15fc72d3c
Author:     akpm@linux-foundation.org <akpm@linux-foundation.org>
AuthorDate: Thu, 17 Dec 2009 15:26:36 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 17 Dec 2009 15:34:29 -0800

x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk

It says

Warning: objdump version  is older than 2.19
Warning: Skipping posttest.

because it used the wrong field from `objdump -v':

akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
GNU objdump 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <200912172326.nBHNQaQl024796@imap1.linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
---
 arch/x86/tools/chkobjdump.awk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/tools/chkobjdump.awk b/arch/x86/tools/chkobjdump.awk
index 0d13cd9..5bbb5a3 100644
--- a/arch/x86/tools/chkobjdump.awk
+++ b/arch/x86/tools/chkobjdump.awk
@@ -9,7 +9,7 @@ BEGIN {
 }
 
 /^GNU/ {
-	split($4, ver, ".");
+	split($3, ver, ".");
 	if (ver[1] > od_ver ||
 	    (ver[1] == od_ver && ver[2] >= od_sver)) {
 		exit 1;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Masami Hiramatsu @ 2009-12-18  0:04 UTC (permalink / raw)
  To: mingo, hpa, linux-kernel, akpm, tglx, mhiramat, mingo; +Cc: linux-tip-commits

Hi,

tip-bot for akpm@linux-foundation.org wrote:
> Commit-ID:  8c63450718ea62ee3a70bffde170b4d15fc72d3c
> Gitweb:     http://git.kernel.org/tip/8c63450718ea62ee3a70bffde170b4d15fc72d3c
> Author:     akpm@linux-foundation.org <akpm@linux-foundation.org>
> AuthorDate: Thu, 17 Dec 2009 15:26:36 -0800
> Committer:  H. Peter Anvin <hpa@zytor.com>
> CommitDate: Thu, 17 Dec 2009 15:34:29 -0800
> 
> x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
> 
> It says
> 
> Warning: objdump version  is older than 2.19
> Warning: Skipping posttest.
> 
> because it used the wrong field from `objdump -v':
> 
> akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
> GNU objdump 2.16.1
> Copyright 2005 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License.  This program has absolutely no warranty.


Oh, I didn't know that.
On my environment, objdump shows version in below format.
---
$ objdump -v
GNU objdump version 2.19.51.0.14-1.fc11 20090722
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
---

Hmm, maybe, we need to check if ($3 == "version") to decide
which argument we should use.

Thank you,


> 
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> LKML-Reference: <200912172326.nBHNQaQl024796@imap1.linux-foundation.org>
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Masami Hiramatsu <mhiramat@redhat.com>
> ---
>  arch/x86/tools/chkobjdump.awk |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/tools/chkobjdump.awk b/arch/x86/tools/chkobjdump.awk
> index 0d13cd9..5bbb5a3 100644
> --- a/arch/x86/tools/chkobjdump.awk
> +++ b/arch/x86/tools/chkobjdump.awk
> @@ -9,7 +9,7 @@ BEGIN {
>  }
>  
>  /^GNU/ {
> -	split($4, ver, ".");
> +	split($3, ver, ".");
>  	if (ver[1] > od_ver ||
>  	    (ver[1] == od_ver && ver[2] >= od_sver)) {
>  		exit 1;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  2009-12-18  0:04   ` Masami Hiramatsu
@ 2009-12-18  0:07     ` H. Peter Anvin
  2009-12-18  0:18       ` Masami Hiramatsu
  0 siblings, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2009-12-18  0:07 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: mingo, linux-kernel, akpm, tglx, mingo, linux-tip-commits

On 12/17/2009 04:04 PM, Masami Hiramatsu wrote:
>>
>> Warning: objdump version  is older than 2.19
>> Warning: Skipping posttest.
>>
>> because it used the wrong field from `objdump -v':
>>
>> akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
>> GNU objdump 2.16.1
>> Copyright 2005 Free Software Foundation, Inc.
>> This program is free software; you may redistribute it under the terms of
>> the GNU General Public License.  This program has absolutely no warranty.
> 
> 
> Oh, I didn't know that.
> On my environment, objdump shows version in below format.
> ---
> $ objdump -v
> GNU objdump version 2.19.51.0.14-1.fc11 20090722
> Copyright 2008 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) any later version.
> This program has absolutely no warranty.
> ---
> 
> Hmm, maybe, we need to check if ($3 == "version") to decide
> which argument we should use.
> 

How about looking for the first argument that starts with a number?

	-hpa

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  2009-12-18  0:07     ` H. Peter Anvin
@ 2009-12-18  0:18       ` Masami Hiramatsu
  2009-12-18  0:25         ` H. Peter Anvin
  0 siblings, 1 reply; 10+ messages in thread
From: Masami Hiramatsu @ 2009-12-18  0:18 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: mingo, linux-kernel, akpm, tglx, mingo, linux-tip-commits

H. Peter Anvin wrote:
> On 12/17/2009 04:04 PM, Masami Hiramatsu wrote:
>>>
>>> Warning: objdump version  is older than 2.19
>>> Warning: Skipping posttest.
>>>
>>> because it used the wrong field from `objdump -v':
>>>
>>> akpm:/usr/src/25> /opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-objdump -v
>>> GNU objdump 2.16.1
>>> Copyright 2005 Free Software Foundation, Inc.
>>> This program is free software; you may redistribute it under the terms of
>>> the GNU General Public License.  This program has absolutely no warranty.
>>
>>
>> Oh, I didn't know that.
>> On my environment, objdump shows version in below format.
>> ---
>> $ objdump -v
>> GNU objdump version 2.19.51.0.14-1.fc11 20090722
>> Copyright 2008 Free Software Foundation, Inc.
>> This program is free software; you may redistribute it under the terms of
>> the GNU General Public License version 3 or (at your option) any later version.
>> This program has absolutely no warranty.
>> ---
>>
>> Hmm, maybe, we need to check if ($3 == "version") to decide
>> which argument we should use.
>>
> 
> How about looking for the first argument that starts with a number?

Sure, that's also possible. :-)

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [tip:x86/urgent] x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  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:40           ` [PATCH x86/urgent v2] " Masami Hiramatsu
  0 siblings, 2 replies; 10+ messages in thread
From: H. Peter Anvin @ 2009-12-18  0:25 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: mingo, linux-kernel, akpm, tglx, mingo, linux-tip-commits

On 12/17/2009 04:18 PM, Masami Hiramatsu wrote:
>>
>> How about looking for the first argument that starts with a number?
> 
> Sure, that's also possible. :-)
> 

Could you send me a patch?

	-hpa


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH x86/urgent] x86: Fix objdump version check in chkobjdump.awk for different formats.
  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
  0 siblings, 0 replies; 10+ messages in thread
From: Masami Hiramatsu @ 2009-12-18 15:32 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Ingo Molnar, H. Peter Anvin, lkml, DLE, Thomas Gleixner,
	Andrew Morton

Masami Hiramatsu wrote:
> 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.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@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>
> ---
> 
>  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..250dc79 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++);
                                   ^^^^oops, it's not needed!

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH x86/urgent] x86: Fix objdump version check in chkobjdump.awk for different formats.
  2009-12-18  0:25         ` H. Peter Anvin
@ 2009-12-18 15:34           ` Masami Hiramatsu
  2009-12-18 15:32             ` Masami Hiramatsu
  2009-12-18 15:40           ` [PATCH x86/urgent v2] " Masami Hiramatsu
  1 sibling, 1 reply; 10+ messages in thread
From: Masami Hiramatsu @ 2009-12-18 15:34 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, lkml
  Cc: DLE, Masami Hiramatsu, Thomas Gleixner, Ingo Molnar,
	Andrew Morton

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.

Signed-off-by: Masami Hiramatsu <mhiramat@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>
---

 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..250dc79 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;


-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH x86/urgent v2] x86: Fix objdump version check in chkobjdump.awk for different formats.
  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:40           ` Masami Hiramatsu
  2009-12-18 18:06             ` [tip:x86/urgent] " tip-bot for Masami Hiramatsu
  1 sibling, 1 reply; 10+ messages in thread
From: Masami Hiramatsu @ 2009-12-18 15:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, lkml
  Cc: DLE, Masami Hiramatsu, Thomas Gleixner, Ingo Molnar,
	Andrew Morton

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>
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>
---

 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;


-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [tip:x86/urgent] x86: Fix objdump version check in chkobjdump.awk for different formats.
  2009-12-18 15:40           ` [PATCH x86/urgent v2] " Masami Hiramatsu
@ 2009-12-18 18:06             ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 10+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2009-12-18 18:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, akpm, tglx, mhiramat, mingo

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;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-18 18:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 23:26 + arch-x86-tools-chkobjdumpawk-fix-it.patch added to -mm tree akpm
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:x86/urgent] " tip-bot for Masami Hiramatsu

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.