This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56371] When building GCC from combined tree, configure is making wrong assumptions about 'gas' and 'ld'
- From: "k2k at narod dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Feb 2013 15:59:56 +0000
- Subject: [Bug c/56371] When building GCC from combined tree, configure is making wrong assumptions about 'gas' and 'ld'
- Auto-submitted: auto-generated
- References: <bug-56371-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56371
--- Comment #2 from Karlson2k <k2k at narod dot ru> 2013-02-22 15:59:56 UTC ---
There is bug in configure script. Just before 'checking linker for .hidden
support', configure detect ld version by:
if test $in_tree_ld != yes ; then
ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
if echo "$ld_ver" | grep GNU > /dev/null; then
if test x"$ld_is_gold" = xyes; then
[... cut ...]
fi
ld_date=`echo $ld_ver | sed -n
's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
else
case "${target}" in
[... cut ...]
esac
fi
fi
But in tree ld version is not detected at all!
Just a few lines later:
if test $in_tree_ld = yes ; then
gcc_cv_ld_hidden=no
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge
13 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_hidden=yes
fi
else
configure make some assumption about ld basing on lv version.
As ld is build before run of gcc's configure, all detection could be unified
for in-tree ld and external ld.