This is the mail archive of the 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]


We have several bug reports for 4.6.0 about failures of the form 

checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

The problem arising when building a cross-compiler for a GNU/Linux
target.  Configure scripts like libiberty/,
libquadmath/, etc., use GCC_NO_EXECUTABLES.  The
GCC_NO_EXECUTABLES macro checks whether a link succeeds.  If it does
not, it sets gcc_no_link.  If a later attempt to run a link test, the
above error is reported.

Unfortunately, on a GNU/Linux host (recall that for a target library,
the target is the host), libtool itself does a link test.  From the top
level libtool.m4 file, in _LT_SYS_DYNAMIC_LINKER, in the "linux* |
k*bsd*-gnu | kopensolaris*-gnu" case:

      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],

That test fails when a link fails.  That test must not be run when
linking fails.

Shortly after that code in libtool.m4, I see this:

  if test -f /etc/; then
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"

Testing /etc/ is absolutely meaningless when building a target
library for a non-native compilation.  That test must not be run when

We should definitely fix this for gcc 4.6.1.  However, I don't know what
the best way to fix this is.  Our gcc-specific target libraries check
$with_cross_host to see if they are being built as a cross-compiled
target library.  Presumably libtool doesn't want to check that.
GCC_NO_EXECUTABLES sets a gcc-specific shell variable and overrides
AC_LINK_IFELSE to test variable.  libtool doesn't know anything about
that.  So what should we do here?


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