gcc-4.3.0 configure can't identify ld 2.18 version

2008-04-07 Thread Yevgeniy Litvinenko
Hello.

I have binutils 2.18
   $ ld --version
   GNU ld (GNU Binutils) 2.18
   ...

But during compilation of gcc-4.3.0 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 two configure scripts can not determine the linker
version. These scripts are:
gcc-4.3.0/libstdc++-v3/configure
and
gcc-4.3.0/libgomp/configure

Thanks




../gcc-4.2.2/libstdc++-v3/configure can't determine version of ld 2.18

2008-01-10 Thread Yevgeniy Litvinenko
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
~



gcc-4.2.2 configure can't identify assembler 2.18 version

2008-01-09 Thread Yevgeniy Litvinenko
Hello,

Configuration script gcc-4.2.2/gcc/configure returns an error
/home/unix/gcc-4.2.2/gcc/configure[14029]: assembler: unknown test operator
when trying to determine assembler version


In binutils-2.18
as --version
returns
GNU assembler (GNU Binutils) 2.18 (not GNU assembler 2.18)


In the configuration file gcc-4.2.2/gcc/configure
there is a line: 
  as_ver=`$gcc_cv_as --version 2/dev/null | sed 1q`
this line gives
GNU assembler (GNU Binutils) 2.18 as a value of $as_ver

then line
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
give the same string - GNU assembler (GNU Binutils) 2.18

and after the line
as_major=`echo $as_ver | sed 's/\..*//'`

$as_major is equal to GNU assembler (GNU Binutils) 2

as a result we have an error at line
If test $as_major -eq 2  test $as_minor -lt 11



Best regards.
~
Yevgeniy Litvinenko

~