* [PATCH] ld-version: Drop the 4th and 5th version components
@ 2016-02-11 14:25 Maciej W. Rozycki
2016-02-11 15:53 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2016-02-11 14:25 UTC (permalink / raw)
To: Ralf Baechle
Cc: Michael S. Tsirkin, Michal Marek, James Hogan, linux-kbuild,
linux-mips, linux-kernel
... making upstream development binutils snapshots work as expected,
e.g.:
$ mips64el-linux-ld --version
GNU ld (GNU Binutils) 2.20.1.20100303
[...]
$
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
---
It may well actually have been a release mistake with the proper 2.20.1
maintenance release as I reckon the development vs release build switch is
a knob that used to require to be flipped in the sources by the release
manager; maybe it still does. Either way this version guarantees all the
2.20.1 stuff to be present as the version number is only bumped up as a
release is being made, so any prior snapshot would report 2.20.0.20100302,
etc., or maybe even 2.20.0.20100303 if made earlier on on the same day.
So please apply, or anyone is welcome to improve it, as my limited awk-fu
(which I'll be happy to get corrected) tells me the script doesn't really
terminate parsing on a non-point-non-digit character.
NB comments in scripts/Kbuild.include around `ld-version' have not been
accordingly updated in the course of changes made to `ld-version.sh' and
they still need such an update, unless we right-shift the version code
calculated back by 4 decimal digits, which I hesitated doing here for
simplicity. What was the original reason to add the 4th and 5th
components?
Maciej
linux-mips-ld-version-fix.diff
Index: linux-20160211/scripts/ld-version.sh
===================================================================
--- linux-20160211.orig/scripts/ld-version.sh
+++ linux-20160211/scripts/ld-version.sh
@@ -5,6 +5,6 @@
gsub(".*version ", "");
gsub("-.*", "");
split($1,a, ".");
- print a[1]*100000000 + a[2]*1000000 + a[3]*10000 + a[4]*100 + a[5];
+ print a[1]*100000000 + a[2]*1000000 + a[3]*10000;
exit
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld-version: Drop the 4th and 5th version components
2016-02-11 14:25 [PATCH] ld-version: Drop the 4th and 5th version components Maciej W. Rozycki
@ 2016-02-11 15:53 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-02-11 15:53 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: Ralf Baechle, Michael S. Tsirkin, James Hogan, linux-kbuild,
linux-mips, linux-kernel
On 2016-02-11 15:25, Maciej W. Rozycki wrote:
> ... making upstream development binutils snapshots work as expected,
> e.g.:
>
> $ mips64el-linux-ld --version
> GNU ld (GNU Binutils) 2.20.1.20100303
> [...]
> $
>
> Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
fwiw, Acked-by: Michal Marek <mmarek@suse.cz>
> NB comments in scripts/Kbuild.include around `ld-version' have not been
> accordingly updated in the course of changes made to `ld-version.sh' and
> they still need such an update, unless we right-shift the version code
> calculated back by 4 decimal digits, which I hesitated doing here for
> simplicity. What was the original reason to add the 4th and 5th
> components?
No idea, but I don't think we will ever need this level of detail. So
yes, the script and its only in-tree user could be updated to divide the
numbers by 10000.
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-11 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 14:25 [PATCH] ld-version: Drop the 4th and 5th version components Maciej W. Rozycki
2016-02-11 15:53 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).