------- Comment #8 from vijay dot x dot jain at jpmchase dot com 2009-09-15 04:18 ------- I have got the issue. The problem is not sed but rather the pattern being searched from ld --version My ld --version returns GNU ld (GNU Binutils)2.18
Where the pattern looked by the search pattern is GNU (go) ld (version)2.18 Please note that the LD version is 2.18 downloaded from GNU site itself. I modidified the command ld --version| head -1| sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/' to ld --version| head -1| cut -f2 -d')' Then the results for nawk -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }' were as expected. ld --version| head -1| cut -f2 -d')' | nawk -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }' 21800 and then gcc the build went through sucessfully. Using this gcc, I have been sucessful in building various component of our application. Few components of our application still remaining to build. But I think there is a potential bug with GCC compilation, the way it uses pattern to determine ld version to enable versioning with the compiler. Either the ld code should be modified to give version in consistent format or the compiler compilation script should be modified to accomodate all possible formats of the out of ld --version. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41333