--version output: part of the "ABI" ?

Ian Lance Taylor iant@google.com
Tue May 12 02:06:00 GMT 2009


Mike Frysinger <vapier@gentoo.org> writes:

> it isnt uncommon for packages to parse the version output of GNU packages.  
> typically they take the format:
> <program name> (<project name>) <project version>
> <copyright/license notices>
>
> so here is `head -n1` of ls, makeinfo, ld, and gcc:
> ls (GNU coreutils) 7.4
> makeinfo (GNU texinfo) 4.13
> GNU ld (Linux/GNU Binutils) 2.19.51.0.4.20090418
> gcc (Gentoo 4.3.3-r2) 4.3.3
>
> binutils, gcc, and glibc expect this kind of thing when detecting GNU tool 
> versions.  gold however uses a different format:
> GNU gold (GNU Binutils 2.19.51.20090510) 1.9
>
> which causes things like glibc to fall over because it finds "1.9" instead of 
> "2.19.xxx".  as such, i think the gold version output should be changed to 
> something like:
> GNU gold (GNU Binutils 1.9) 2.19.51.20090510
>
> or omit the 1.9 completely ...

I'm not strongly attached to the current format, but I do think that
gold is correctly following the GNU standards as documented at

http://www.gnu.org/prep/standards/html_node/_002d_002dversion.html

There are many problems using glibc with gold; figuring out the version
number is the least of them.  If glibc is changed to work with gold, the
version recognition mechanism will need to be changed anyhow, since gold
works differently from GNU ld in ways that matter to glibc.  So I don't
think that the glibc configure script is a strong argument for changing
gold's --version output.

Ian



More information about the Binutils mailing list