public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fixup binutils printing from scripts/ver_linux
@ 2007-07-08 23:47 Jesper Juhl
  2007-07-09  2:06 ` Alexey Dobriyan
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Juhl @ 2007-07-08 23:47 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Jesper Juhl, sam

I just found that scripts/ver_linux does not print the binutils version 
properly on my Slackware 12.0 system. 
The following patch fixes things up.

Pre this patch:
juhl@dragon:~/kernel/linux-2.6$ scripts/ver_linux
...
binutils               Binutils
...

Post this patch:
juhl@dragon:~/kernel/linux-2.6$ scripts/ver_linux
...
binutils               2.17.50.0.17.20070615
...


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 scripts/ver_linux |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 72876df..2f96a1b 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -21,9 +21,8 @@ gcc --version 2>&1| grep gcc | awk \
 make --version 2>&1 | awk -F, '{print $1}' | awk \
       '/GNU Make/{print "Gnu make              ",$NF}'
 
-ld -v | awk -F\) '{print $1}' | awk \
-'/BFD/{print "binutils              ",$NF} \
-/^GNU/{print "binutils              ",$4}'
+echo "binutils               $(ld -v | awk -F \) \
+{'print $2'} | tr -d ' ')"
 
 echo -n "util-linux             "
 fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//





-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html



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

* Re: [PATCH] fixup binutils printing from scripts/ver_linux
  2007-07-08 23:47 [PATCH] fixup binutils printing from scripts/ver_linux Jesper Juhl
@ 2007-07-09  2:06 ` Alexey Dobriyan
  2007-07-09  2:39   ` Gabriel C
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Dobriyan @ 2007-07-09  2:06 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Linux Kernel Mailing List, sam

On Mon, Jul 09, 2007 at 01:47:58AM +0200, Jesper Juhl wrote:
> I just found that scripts/ver_linux does not print the binutils version 
> properly on my Slackware 12.0 system.

> --- a/scripts/ver_linux
> +++ b/scripts/ver_linux
> @@ -21,9 +21,8 @@ gcc --version 2>&1| grep gcc | awk \
>  make --version 2>&1 | awk -F, '{print $1}' | awk \
>        '/GNU Make/{print "Gnu make              ",$NF}'
>  
> -ld -v | awk -F\) '{print $1}' | awk \
> -'/BFD/{print "binutils              ",$NF} \
> -/^GNU/{print "binutils              ",$4}'
> +echo "binutils               $(ld -v | awk -F \) \
> +{'print $2'} | tr -d ' ')"

NAK. It starts reporting here empty binutils field.
FWIW,

	$ ld -v
	GNU ld version 2.16.1


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

* Re: [PATCH] fixup binutils printing from scripts/ver_linux
  2007-07-09  2:06 ` Alexey Dobriyan
@ 2007-07-09  2:39   ` Gabriel C
  2007-07-09 10:41     ` Jan Engelhardt
  0 siblings, 1 reply; 9+ messages in thread
From: Gabriel C @ 2007-07-09  2:39 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Jesper Juhl, Linux Kernel Mailing List, sam

Alexey Dobriyan wrote:
> On Mon, Jul 09, 2007 at 01:47:58AM +0200, Jesper Juhl wrote:
>   
>> I just found that scripts/ver_linux does not print the binutils version 
>> properly on my Slackware 12.0 system.
>>     
>
>   
>> --- a/scripts/ver_linux
>> +++ b/scripts/ver_linux
>> @@ -21,9 +21,8 @@ gcc --version 2>&1| grep gcc | awk \
>>  make --version 2>&1 | awk -F, '{print $1}' | awk \
>>        '/GNU Make/{print "Gnu make              ",$NF}'
>>  
>> -ld -v | awk -F\) '{print $1}' | awk \
>> -'/BFD/{print "binutils              ",$NF} \
>> -/^GNU/{print "binutils              ",$4}'
>> +echo "binutils               $(ld -v | awk -F \) \
>> +{'print $2'} | tr -d ' ')"
>>     
>
> NAK. It starts reporting here empty binutils field.
> FWIW,
>
> 	$ ld -v
> 	GNU ld version 2.16.1
>
>
>   

Well the format changed so now we have :

$ ld -v
GNU ld (Linux/GNU Binutils) 2.17.50.0.16.20070511

Maybe something like this may work :

echo "binutils $(ld -v | tr -d [:alpha:] | sed 's/.*)/\//;s/\///g' | tr 
-d ' ')"


Regards,

Gabriel C





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

* Re: [PATCH] fixup binutils printing from scripts/ver_linux
  2007-07-09  2:39   ` Gabriel C
@ 2007-07-09 10:41     ` Jan Engelhardt
  2007-07-09 11:33       ` drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux) Oleg Verych
  2007-07-09 11:39       ` [PATCH] fixup binutils printing from scripts/ver_linux Gabriel C
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Engelhardt @ 2007-07-09 10:41 UTC (permalink / raw)
  To: Gabriel C; +Cc: Alexey Dobriyan, Jesper Juhl, Linux Kernel Mailing List, sam


On Jul 9 2007 04:39, Gabriel C wrote:
>>
>> NAK. It starts reporting here empty binutils field.
>> FWIW,
>>
>>  $ ld -v
>>  GNU ld version 2.16.1
>>
>
> Well the format changed so now we have :
>
> $ ld -v
> GNU ld (Linux/GNU Binutils) 2.17.50.0.16.20070511

Adding to the collection:
12:39 ichi:~ > ld -v
GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)


	Jan
-- 

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

* drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux)
  2007-07-09 10:41     ` Jan Engelhardt
@ 2007-07-09 11:33       ` Oleg Verych
  2007-07-09 12:20         ` Oleg Verych
  2007-07-09 11:39       ` [PATCH] fixup binutils printing from scripts/ver_linux Gabriel C
  1 sibling, 1 reply; 9+ messages in thread
From: Oleg Verych @ 2007-07-09 11:33 UTC (permalink / raw)
  To: linux-kernel

* Jan Engelhardt "Mon, 9 Jul 2007 12:41:54 +0200 (CEST)"
>
> On Jul 9 2007 04:39, Gabriel C wrote:
>>>
>>> NAK. It starts reporting here empty binutils field.
>>> FWIW,
>>>
>>>  $ ld -v
>>>  GNU ld version 2.16.1
>>>
>>
>> Well the format changed so now we have :
>>
>> $ ld -v
>> GNU ld (Linux/GNU Binutils) 2.17.50.0.16.20070511
>
> Adding to the collection:
> 12:39 ichi:~ > ld -v
> GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)

Dumb, but better solution: drop that crap, called ver_linux.
Know you have many distros, so be happy with any one, and forget about
black old days of finding toolchain, that can actually build the kernel.

Anything else is a Foo Linux Distribution's Problem (tm)
____


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

* Re: [PATCH] fixup binutils printing from scripts/ver_linux
  2007-07-09 10:41     ` Jan Engelhardt
  2007-07-09 11:33       ` drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux) Oleg Verych
@ 2007-07-09 11:39       ` Gabriel C
  2007-07-09 11:44         ` Jan Engelhardt
  1 sibling, 1 reply; 9+ messages in thread
From: Gabriel C @ 2007-07-09 11:39 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Alexey Dobriyan, Jesper Juhl, Linux Kernel Mailing List, sam

Jan Engelhardt wrote:
> On Jul 9 2007 04:39, Gabriel C wrote:
>   
>>> NAK. It starts reporting here empty binutils field.
>>> FWIW,
>>>
>>>  $ ld -v
>>>  GNU ld version 2.16.1
>>>
>>>       
>> Well the format changed so now we have :
>>
>> $ ld -v
>> GNU ld (Linux/GNU Binutils) 2.17.50.0.16.20070511
>>     
>
> Adding to the collection:
> 12:39 ichi:~ > ld -v
> GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)
>
>
>   

Uhh :) Ok here an ugly one :

$ ld -v | sed 's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
2.17.50.0.16.20070511

$ echo 'GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)' | sed 
's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
2.17.50.0.5

$ echo 'GNU ld version 2.16.1' | sed 's/.*version//;s/.*Binutils)//'|awk 
'{print $1}'|tr -d ' '
2.16.1


Gabriel

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

* Re: [PATCH] fixup binutils printing from scripts/ver_linux
  2007-07-09 11:39       ` [PATCH] fixup binutils printing from scripts/ver_linux Gabriel C
@ 2007-07-09 11:44         ` Jan Engelhardt
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2007-07-09 11:44 UTC (permalink / raw)
  To: Gabriel C; +Cc: Alexey Dobriyan, Jesper Juhl, Linux Kernel Mailing List, sam


On Jul 9 2007 13:39, Gabriel C wrote:
>
> Uhh :) Ok here an ugly one :
>
> $ ld -v | sed 's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
> 2.17.50.0.16.20070511
>
> $ echo 'GNU ld version 2.17.50.0.5 20060927 (SUSE Linux)' | sed
> 's/.*version//;s/.*Binutils)//'|awk '{print $1}'|tr -d ' '
> 2.17.50.0.5
>
> $ echo 'GNU ld version 2.16.1' | sed 's/.*version//;s/.*Binutils)//'|awk
> '{print $1}'|tr -d ' '
> 2.16.1

That could be more beautiful :)
For example (untested)

#!/bin/bash
set -- (`ld -v`);
while [ "$1" != "version" -a $# -gt 0 ]; then
	shift;
done;
if [ "$1" == "version" ]; then
	version="$2";
fi;
if [ -z "$version" ]; then
	echo ld missing or could not figure.
else
	echo "BINUTILS: $version";
fi;


	Jan
-- 

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

* Re: drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux)
  2007-07-09 11:33       ` drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux) Oleg Verych
@ 2007-07-09 12:20         ` Oleg Verych
  2007-07-09 18:42           ` Jan Engelhardt
  0 siblings, 1 reply; 9+ messages in thread
From: Oleg Verych @ 2007-07-09 12:20 UTC (permalink / raw)
  To: linux-kernel

> Dumb, but better solution: drop that crap, called ver_linux.
> Know you have many distros, so be happy with any one, and forget about
> black old days of finding toolchain, that can actually build the kernel.

#v+
echo 'If some fields are empty or look unusual you may have an old version.'
echo 'Compare to the current minimal requirements in Documentation/Changes.'
echo ' '
#v-

The comment above is yet another cause to remind you to check `reportbug`
tool and how it organizes collecting of information for particular bug
report and package.
____


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

* Re: drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux)
  2007-07-09 12:20         ` Oleg Verych
@ 2007-07-09 18:42           ` Jan Engelhardt
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2007-07-09 18:42 UTC (permalink / raw)
  To: Oleg Verych; +Cc: linux-kernel


On Jul 9 2007 12:20, Oleg Verych wrote:
>
>> Dumb, but better solution: drop that crap, called ver_linux.
>> Know you have many distros, so be happy with any one, and forget about
>> black old days of finding toolchain, that can actually build the kernel.
>
>#v+
>echo 'If some fields are empty or look unusual you may have an old version.'
>echo 'Compare to the current minimal requirements in Documentation/Changes.'
>echo ' '
>#v-
>
>The comment above is yet another cause to remind you to check `reportbug`
>tool and how it organizes collecting of information for particular bug
>report and package.

We could just do $(rpm -qf $(which ld))  :^)


	Jan
-- 

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

end of thread, other threads:[~2007-07-09 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-08 23:47 [PATCH] fixup binutils printing from scripts/ver_linux Jesper Juhl
2007-07-09  2:06 ` Alexey Dobriyan
2007-07-09  2:39   ` Gabriel C
2007-07-09 10:41     ` Jan Engelhardt
2007-07-09 11:33       ` drop it ?(Re: [PATCH] fixup binutils printing from scripts/ver_linux) Oleg Verych
2007-07-09 12:20         ` Oleg Verych
2007-07-09 18:42           ` Jan Engelhardt
2007-07-09 11:39       ` [PATCH] fixup binutils printing from scripts/ver_linux Gabriel C
2007-07-09 11:44         ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox