This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
../gcc-4.2.2/libstdc++-v3/configure can't determine version of ld 2.18
- From: Yevgeniy Litvinenko <YLitvinenko at astana dot oilfield dot slb dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Jan 2008 15:26:21 +0600
- Subject: ../gcc-4.2.2/libstdc++-v3/configure can't determine version of ld 2.18
- Reply-to: Yevgeniy Litvinenko <YLitvinenko at astana dot oilfield dot slb dot com>
Hello,
I have binutils 2.18
$ ld --version
GNU ld (GNU Binutils) 2.18
...
But during compilation I get following:
configure: WARNING: === Linker version 1800 is too old for
configure: WARNING: === full symbol versioning support in this release of GCC.
configure: WARNING: === You would need to upgrade your binutils to version
configure: WARNING: === 21400 or later and rebuild GCC.
configure: WARNING: === Symbol versioning will be disabled.
I've found out that in two configure scripts linker version is
determined with following regexp:
../gcc-4.2.2/libstdc++-v3/configure (this script contains a few similar lines with linker definition)
ldver=`$LD --version 2>/dev/null | head -1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
../gcc-4.2.2/libgomp/configure
ldver=`$LD --version 2>/dev/null | head -1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
That regexps are incorrect for ld 2.18.
I think it is better to use following regexp:
ldver=`$LD --version 2>/dev/null | head -1 | sed -e 's/GNU .* \([0-9][0-9.]*\)[. ]*$/\1/'`
or to be stricter and handle only "ld":
ldver=`$LD --version 2>/dev/null | head -1 | sed -e 's/GNU ld .* \([0-9][0-9.]*\)[. ]*$/\1/'`
It takes last word that starts and ends with digit and consist of digits and dots.
And this (first example) regexp can be applied to many GNU programs (as, ar, nm, etc)
Best regards.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yevgeniy Litvinenko
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~