> ldver=`$LD --version 2>/dev/null | head -1 | \
> ! sed -e 's/GNU ld version \(([^(]*)\)\? \?\([0-9.][0-9.]*\).*/\2/'`
^^^^
You want [^)] here.
Also, replace \? with \{0,1\} as it is more portable.
Ok with those changes. Still, please post the link to the revision (in
viewsvn) in order to spot more regex silliness.
Paolo