This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/56371] When building GCC from combined tree, configure is making wrong assumptions about 'gas' and 'ld'


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]